org.llm4s.rag.ContextFormatter
See theContextFormatter companion object
@Experimental
trait ContextFormatter
Writes one retrieved chunk into an answer's prompt (#3024). RAG puts the chunk's number, [n], on the line before what this returns, and fences what it returns inside <context> tags, neutralising any such tag in it, so metadata and content alike reach the model as data: a formatter need not escape anything.
Attributes
- Companion
- object
- Source
- RAGAnswerContext.scala
- Graph
-
- Supertypes
Members list
In this article
