RagRequest

data class RagRequest(val query: String, val similarityThreshold: <Error class: unknown class> = 0.8, val topK: Int = 8, val labels: Set<String> = emptySet())

RAG request. Contains a query and parameters for similarity search.

Parameters

query

the query string to search for

similarityThreshold

the minimum similarity score for results (default is 0.8)

topK

the maximum number of results to return (default is 8)

labels

optional set of labels to filter results. If not set all entities may be returned. If set, only the given entities will be searched for.

Constructors

Link copied to clipboard
constructor(query: String, similarityThreshold: <Error class: unknown class> = 0.8, topK: Int = 8, labels: Set<String> = emptySet())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open val query: String
Link copied to clipboard
open val similarityThreshold: <Error class: unknown class> = 0.8
Link copied to clipboard
open val topK: Int = 8

Functions

Link copied to clipboard
fun matchingLabels(vararg labels: String): RagRequest
Link copied to clipboard
fun withSimilarityThreshold(threshold: <Error class: unknown class>): RagRequest
Link copied to clipboard
fun withTopK(topK: Int): RagRequest