Skip to content

Commit f4a5988

Browse files
committed
Adds more usage notes to README
So that people know what they can adjust easily.
1 parent 63d132c commit f4a5988

File tree

1 file changed

+19
-0
lines changed
  • contrib/hamilton/contrib/dagworks/faiss_rag

1 file changed

+19
-0
lines changed

contrib/hamilton/contrib/dagworks/faiss_rag/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,25 @@ someone having to host and manage a proper vector store.
1111

1212
## Example Usage
1313

14+
### Inputs
15+
These are the defined inputs.
16+
17+
- *input_texts*: A list of strings. Each string will be encoded into a vector and stored in the vector store.
18+
- *question*: A string. This is the question you want to ask the LLM, and vector store which will provide context.
19+
- *top_k*: An integer. This is the number of vectors to retrieve from the vector store. Defaults to 5.
20+
21+
### Overrides
22+
With Hamilton you can easily override a function and provide a value for it. For example if you're
23+
iterating you might just want to override these two values before modifying the functions:
24+
25+
- *context*: if you want to skip going to the vector store and provide the context directly, you can do so by providing this override.
26+
- *rag_prompt*: if you want to provide the prompt to pass to the LLM, pass it in as an override.
27+
28+
### Execution
29+
You can ask to get back any result of an intermediate function by providing the function name in the `execute` call.
30+
Here we just ask for the final result, but if you wanted to, you could ask for outputs of any of the functions, which
31+
you can then introspect or log for debugging/evaluation purposes. Note if you want more platform integrations,
32+
you can add adapters that will do this automatically for you, e.g. like we have the `PrintLn` adapter here.
1433
```python
1534
# import the module
1635
from hamilton import driver

0 commit comments

Comments
 (0)