ContextDeduplication

org.llm4s.rag.ContextDeduplication
@Experimental

Which retrieved chunks RAG drops as repeats before budgeting an answer's prompt (#3024): the same passage in two documents, or a chunk that a neighbour's overlap or a larger chunk already holds. Texts are compared normalised, lower case with runs of whitespace as one space; the higher-ranked chunk is always the one kept.

Attributes

Source
RAGAnswerContext.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

As ExactText, and a chunk whose normalised text is contained in a higher-ranked kept one's is dropped.

As ExactText, and a chunk whose normalised text is contained in a higher-ranked kept one's is dropped.

Attributes

Source
RAGAnswerContext.scala

A chunk whose normalised text is the same as a higher-ranked one's is dropped.

A chunk whose normalised text is the same as a higher-ranked one's is dropped.

Attributes

Source
RAGAnswerContext.scala
case Off extends ContextDeduplication

Every chunk is kept.

Every chunk is kept.

Attributes

Source
RAGAnswerContext.scala