org.llm4s.rag.QuestionCondenser
See theQuestionCondenser companion object
@Experimental
trait QuestionCondenser
Turns a chat follow-up into the standalone question a RAG searches with (#2733), so that "what about the second one?" retrieves what it refers to. Set it with RAGConfig.withQuestionCondenser; the pipeline calls it only when the history passed to queryWithAnswer (or its permission and streaming variants) is non-empty, and the model still answers the original question. A Left fails the query.
A function is one, so withQuestionCondenser((question, history) => ...) takes a lambda; QuestionCondenser.llm is the built-in condenser that asks a model.
Attributes
- Companion
- object
- Source
- QuestionCondenser.scala
- Graph
-
- Supertypes
Members list
In this article
