Can I use RAGFlow together with Langchain? #10739
-
|
How can I integrate RAGFlow as an external retriever for a LangChain-based application? Specifically, is there an official or recommended API/SDK pattern for using RAGFlow purely as a context provider (vector retrieval layer) while LangChain handles orchestration and LLM calls?” |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
|
Hi @kenmbelenzi! I'm Dosu and I’m helping the ragflow team. Yes, you can use RAGFlow with LangChain by integrating RAGFlow as an external retriever/context provider. The recommended approach is to use RAGFlow’s REST API or Python SDK to fetch relevant context chunks from your knowledge base, then pass those results into LangChain for orchestration and LLM calls. There’s no dedicated LangChain integration, but the API/SDK pattern is straightforward: call RAGFlow’s To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi @kenmbelenzi! I'm Dosu and I’m helping the ragflow team.
Yes, you can use RAGFlow with LangChain by integrating RAGFlow as an external retriever/context provider. The recommended approach is to use RAGFlow’s REST API or Python SDK to fetch relevant context chunks from your knowledge base, then pass those results into LangChain for orchestration and LLM calls. There’s no dedicated LangChain integration, but the API/SDK pattern is straightforward: call RAGFlow’s
/retrievalendpoint (or use theretrievemethod in the Python SDK) with your query, API token, and knowledge base ID, and use the returned chunks as context in your LangChain pipeline. This pattern aligns with how LangChain expe…