Note: For complete examples including RAG chains and ReAct agents, see the LangChain cookbook.
Why use Moss with LangChain?
LangChain’s retriever interface is the standard way to plug external knowledge into LLM chains. Moss delivers sub-10ms semantic search that slots directly into this interface, giving your chains and agents fast, accurate retrieval without the latency overhead of traditional vector databases.Required tools
Integration guide
Use as a retriever
The cookbook provides a
MossRetriever class that implements LangChain’s BaseRetriever interface. It loads the Moss index once and returns Document objects with metadata and relevance scores.