Skip to content

Adding a Vector Database #261

Answered by yannemcie
gururise asked this question in Q&A
Discussion options

You must be logged in to vote

It sounds like you want to add knowledge retrieval for your agent. Your intuition is correct: this is done through creating a tool. In tool code, you can basically do whatever you want, including accessing a vector DB. You can also define your tool such that the LLM produces the query with which you'll retrieve docs from the DB, simply through adding a named parameter to your tool.

Regarding more context, yes this is possible. While we're actually in the process of adding more structure around this (see #260), you can already describe your tool and its parameters in detail via the tool function's docstring. For example:

@tool
async def knowledgebase_lookup(context: ToolContext, query: str) 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gururise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants