RAG Search
RAG (Retrieval Augmented Generation) search uses an LLM to generate answers from a set of data that it uses as context. RAG attempts to balance the power of answer generation by using LLM to generate a simple natural language answer, with the reliability of a document query. It ensures that you can trace the generated answer to a specific source.
In Knowledge Discovery, you perform RAG by using the Answer Server, in combination with a Content component index. You can optionally also use Query Manipulation Server to augment and expand the RAG search.
The stages of a RAG search are:
-
Candidate Retrieval. Answer Server sends a query to Content to retrieve documents that match the initial question. You can choose whether to perform a conceptual search, a vector search, or a combination of the two. This query returns the candidate documents that the LLM uses for context.
You can optionally include QMS in this step, for example to expand the query with synonyms.
-
Answer Generation. Answer Server sends the candidate documents to a configured LLM in a prompt, and the LLM generates an answer to the question.