Skip to main content

RAG in LoyJoy

Retrieval Augmented Generation (RAG) grounds AI Agents in your own content instead of relying only on the model's training data. LoyJoy has used this pattern since 2023.

How It Works​

  1. Indexing: You maintain a knowledge base by adding websites, uploading documents (PDF, DOCX, PPTX), or pushing data via API. LoyJoy generates vector embeddings for each chunk and stores them alongside the source text.
  2. Retrieval: When a customer sends a message, it is embedded and matched against the knowledge base via semantic search.
  3. Answering: The top matching chunks are passed to the LLM as context together with the prompt and conversation history. The LLM answers from that context.

Configuration Points​

  • Knowledge sources: add and manage sources in the Sources area.
  • Curated content: manage catalogs and articles for hand-maintained answer material.
  • Module-level settings: the AI Knowledge module holds settings such as chunk count, reranking, and the question splitter.

For new use cases, use the AI Agent module with the knowledge search tool. It calls the knowledge base as part of a tool loop and combines it with web search, file access, and product search. The AI Knowledge module remains available for simpler, single-query setups.

For a deeper practical introduction, see the RAG guide.