-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Llama index milvus rag #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Llama index milvus rag #11
Conversation
Signed-off-by: Ash Evans <ash.evans@ibm.com>
…he env vars Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Hi @aevo98765 , this is a good start. I see that you use the native markdown chunker from RAG. I think we can do better: @vagenas has been working on native chunker on the DoclingDocument and a lot of experience with llama-index. You can find a nice example here: rag_llamaindex.ipynb
|
@aevo98765 I dont see where we use the ollama llm. Do we need to define an llm, or can we simply get away with a simple chromadb? |
Signed-off-by: Ash Evans <ash.evans@ibm.com>
… to docling node parser Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
@PeterStaar-IBM Changed the code to use the docling native approach. I had to switch to Milvus to achieve this and store this in memory. ChromaDB wouldn't work. Ollama models are used under the hood in the LlamaIndex query engine. It is not explicit at the moment as it is set as a 'SETTING' which reads in like an environment variable for LlamaIndex to use. Hope this makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- To frame this new feature within the purpose of
docling-mcp
: I would document it inREADME.md
more clearly as an optional feature. We could have a separate section at the end (for instance, Applications) where we explain howdocling-mcp
can be leveraged in Agentic RAG applications (basically, what you wrote in terms of configuration and examples). - In connection with above, I would move the
export_docling_document_to_vector_db
andsearch_documents
tools to another module. For instance,rag.py
- In other docling repos, we leverage pydantic settings, since we think they offer some advantages (we can clearly define the options and type-hint them, validate them, leverage aliases, automatically manage nested variables...).
Later on, we can:
- enable other LLM providers (e.g., watsonx.ai)
- add more variables (e.g., chunker type and chunking options)
Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com>
…ded at the end in a Applications section Signed-off-by: Ash Evans <ash.evans@ibm.com>
…ng-mcp into llama-index-chromadb-rag
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Also the tests are failing. This will be because the applications milvus RAG code is conditional. We would need to pass env vars to the test pipeline to fix this. Any suggesstions or advice here? |
I have added a conditional import on commit dbde847 |
Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
The application tools 'export_docling_document_to_vector_db' and 'search_documents' are imported in 'server.py' depending on the environmental variables. Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
a34b0bd
to
dbde847
Compare
LGTM |
Signed-off-by: Ash Evans <ash.evans@ibm.com>
Description
This pull request adds a llama-index RAG implementation. This depends upon ollama local model hosting. The instructions of how to setup have been added.
Suggestions for future improvements: