Why there is no support for building custom RAG without using Vertex AI RAG service ?
** Please make sure you read the contribution guide and file the issues in the rigth place. ** Contribution guide.
Is your feature request related to a problem? Please describe. We are in the process of choosing one framework for building the Multi Agent application. The only thing which lacks in the google adk is support for building RAGs. As far as I have read the documentation, there is not section for building it.
Describe the solution you'd like There should be a support for using other vector database in order to build RAGs.
Describe alternatives you've considered Currently we are considering Autogen or crew ai for building RAGs.
Additional context NA
You can setup your own rag store and define a retrieval function over it. and then pass the retrieval function to the agent.
You can modify this example to work with any custom rag: https://github.com/google/adk-samples/blob/main/agents/RAG/rag/agent.py.
Which rag store do you want to use?
@hangfei We are almost set to use chromaDB as a Knowledge base for our RAG.
Would love to see an example. Curious to see how Qdrant could be employed,and how the memory service could be ingested into that vector db.
Looks like the file @hangfei mentioned is now here
@garrettlove8 Is this not still just using vertex AI rag? How can this work using qdrant/qdrant client, or any other vector db and non-vertext retriever?
This works with a retriever tool for now
async def knowledgebase_search(query: str):
"""
Retrieves relevant documents from the knowledgebase using Qdrant vector search.
Args:
query: query to search for in the vector db
Returns:
dict with 'documents': list of {id, text}
"""
db = QdrantDB()
query_vec = embed(query)
top_docs = db.search(query_vec, top_k=2)
results = [{"id": doc_id, "text": text} for doc_id, text in top_docs]
return {"documents": results}
Hi all, thanks for flagging! Given that there is an option to use the retriever tool as @lsinghkochava pointed out, we will close this for the time being. Please feel free to re-open if necessary.