RagProperties

@ConfigurationProperties(prefix = "rag")
data class RagProperties(val indexPath: String = "./rag-index", val storeChunkText: Boolean = true, val uploadMaxBytes: Long = 10 * 1024 * 1024, val uploadAllowedContentTypes: List<String> = listOf( "text/plain", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation" ), val sourceLoadTimeoutMillis: Long, val sourceLoadAllowHosts: List<String> = emptyList(), val sourceLoadAuthHeaders: Map<String, String> = emptyMap(), val sourceLoadInsecureSkipTlsVerify: Boolean = false, val sourceLoadCustomCaCertPath: String? = null, val sourceLoadDefaultProfile: String? = null, val sourceLoadProfiles: Map<String, SourceLoadProfile> = emptyMap(), val statsCacheTtlMillis: Long, val statsCacheMaxEntries: Int = 32, val statsCacheMaxEntriesPerTenant: Int = 4, val contextualRetrievalEnabled: Boolean = true, val contextualIncludeDocId: Boolean = true, val contextualIncludeMetadataContext: Boolean = true, val contextualMaxDocumentSummaryChars: Int = 240, val rerankerEnabled: Boolean = true, val rerankerType: String = "heuristic", val rerankerTopN: Int = 24, val rerankerAlpha: Double = 0.65, val rerankerApiBaseUrl: String = "https://api.cohere.com", val rerankerApiKey: String? = null, val rerankerModel: String = "rerank-v3.5", val rerankerRequestTimeoutMillis: Long, val rerankerOnnxQueryInputName: String? = null, val rerankerOnnxDocumentInputName: String? = null, val rerankerOnnxOutputName: String? = null, val rerankerOnnxExpectedDimensions: Int = 0, val rerankerOnnxExpectedInputSchema: String? = null, val rerankerOnnxExpectedTokenizer: String? = null, val rerankerOnnxExpectedScoreSemantics: String? = null, val rerankerOnnxExpectedTokenizerVocabChecksum: String? = null, val rerankerOnnxTokenizerSchemaChecksum: String? = null, val rerankerOnnxModelContractChecksum: String? = null, val correctiveRetrievalEnabled: Boolean = true, val correctiveMinConfidence: Double = 0.08, val correctiveMinResultsBeforeSkip: Int = 3, val correctiveExpandedCandidateMultiplier: Int = 2, val queryRewriteEnabled: Boolean = true, val queryRewriterType: String = "heuristic", val queryRewriteApiBaseUrl: String = "https://api.openai.com/v1", val queryRewriteApiKey: String? = null, val queryRewriteModel: String = "gpt-4o-mini", val queryRewriteRequestTimeoutMillis: Long, val hierarchicalSummariesEnabled: Boolean = true, val hierarchicalMaxSectionSummaries: Int = 4, val hierarchicalMaxSummaryChars: Int = 280, val hierarchicalTargetChunksPerSection: Int = 3, val summarizerType: String = "rule-based", val summarizerApiBaseUrl: String = "https://api.openai.com/v1", val summarizerApiKey: String? = null, val summarizerModel: String = "gpt-4o-mini", val summarizerRequestTimeoutMillis: Long, val statsCacheStoreType: String = "memory", val statsCacheFilePath: String? = null, val statsCacheFileMaxBytes: Long = 0, val statsCacheFileRotateCount: Int = 2, val statsCacheFileCleanupOnStart: Boolean = false, val providerHealthAutoExportPath: String? = null, val providerHealthAutoExportIntervalMillis: Long = 0, val providerHealthAutoExportWindowMillis: Long? = null, val providerHealthAutoExportFormat: String = "json", val providerHealthAutoExportRetainCount: Int = 5, val providerHealthAutoExportIncludeScopeSuffix: Boolean = false, val providerHealthAutoExportPushUrl: String? = null, val providerHealthAutoExportPushFormat: String = "json", val providerHealthAutoExportPushTimeoutMillis: Long, val providerHealthAutoExportPushHeaders: Map<String, String> = emptyMap(), val providerHealthAutoExportPushMaxRetries: Int = 2, val providerHealthAutoExportPushRetryBackoffMillis: Long = 250, val providerHealthAutoExportPushDeadLetterPath: String? = null, val providerHealthAutoExportPushDeadLetterRetainCount: Int = 5, val providerHealthAutoExportPushAsyncEnabled: Boolean = false, val providerHealthAutoExportPushQueueCapacity: Int = 32, val providerHealthAutoExportPushDropOldestOnOverflow: Boolean = true, val providerHealthAutoExportPushHmacSecret: String? = null, val providerHealthAutoExportPushHmacHeaderName: String = "X-Rag-Signature", val providerHealthAutoExportPushTimestampHeaderName: String = "X-Rag-Timestamp", val chunkerType: String = "basic", val basicMaxChars: Int = 1800, val basicOverlapChars: Int = 200, val slidingWindowSize: Int = 240, val slidingOverlap: Int = 40, val adaptiveSectionRegex: String = com.ainsoft.rag.chunking.Chunkers.DEFAULT_ADAPTIVE_SECTION_REGEX, val adaptiveMinChunkSize: Int = 200, val adaptiveMaxChunkSize: Int = 1000, val regexSplitPattern: String = "(?m)^##?", val regexGroupByPattern: String? = null, val embeddingDimensions: Int = 256, val embeddingProvider: String = "hash", val openAiApiKey: String? = null, val openAiModel: String = "text-embedding-3-small", val openAiBaseUrl: String = "https://api.openai.com/v1")

Constructors

Link copied to clipboard
constructor(indexPath: String = "./rag-index", storeChunkText: Boolean = true, uploadMaxBytes: Long = 10 * 1024 * 1024, uploadAllowedContentTypes: List<String> = listOf( "text/plain", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation" ), sourceLoadTimeoutMillis: Long, sourceLoadAllowHosts: List<String> = emptyList(), sourceLoadAuthHeaders: Map<String, String> = emptyMap(), sourceLoadInsecureSkipTlsVerify: Boolean = false, sourceLoadCustomCaCertPath: String? = null, sourceLoadDefaultProfile: String? = null, sourceLoadProfiles: Map<String, SourceLoadProfile> = emptyMap(), statsCacheTtlMillis: Long, statsCacheMaxEntries: Int = 32, statsCacheMaxEntriesPerTenant: Int = 4, contextualRetrievalEnabled: Boolean = true, contextualIncludeDocId: Boolean = true, contextualIncludeMetadataContext: Boolean = true, contextualMaxDocumentSummaryChars: Int = 240, rerankerEnabled: Boolean = true, rerankerType: String = "heuristic", rerankerTopN: Int = 24, rerankerAlpha: Double = 0.65, rerankerApiBaseUrl: String = "https://api.cohere.com", rerankerApiKey: String? = null, rerankerModel: String = "rerank-v3.5", rerankerRequestTimeoutMillis: Long, rerankerOnnxQueryInputName: String? = null, rerankerOnnxDocumentInputName: String? = null, rerankerOnnxOutputName: String? = null, rerankerOnnxExpectedDimensions: Int = 0, rerankerOnnxExpectedInputSchema: String? = null, rerankerOnnxExpectedTokenizer: String? = null, rerankerOnnxExpectedScoreSemantics: String? = null, rerankerOnnxExpectedTokenizerVocabChecksum: String? = null, rerankerOnnxTokenizerSchemaChecksum: String? = null, rerankerOnnxModelContractChecksum: String? = null, correctiveRetrievalEnabled: Boolean = true, correctiveMinConfidence: Double = 0.08, correctiveMinResultsBeforeSkip: Int = 3, correctiveExpandedCandidateMultiplier: Int = 2, queryRewriteEnabled: Boolean = true, queryRewriterType: String = "heuristic", queryRewriteApiBaseUrl: String = "https://api.openai.com/v1", queryRewriteApiKey: String? = null, queryRewriteModel: String = "gpt-4o-mini", queryRewriteRequestTimeoutMillis: Long, hierarchicalSummariesEnabled: Boolean = true, hierarchicalMaxSectionSummaries: Int = 4, hierarchicalMaxSummaryChars: Int = 280, hierarchicalTargetChunksPerSection: Int = 3, summarizerType: String = "rule-based", summarizerApiBaseUrl: String = "https://api.openai.com/v1", summarizerApiKey: String? = null, summarizerModel: String = "gpt-4o-mini", summarizerRequestTimeoutMillis: Long, statsCacheStoreType: String = "memory", statsCacheFilePath: String? = null, statsCacheFileMaxBytes: Long = 0, statsCacheFileRotateCount: Int = 2, statsCacheFileCleanupOnStart: Boolean = false, providerHealthAutoExportPath: String? = null, providerHealthAutoExportIntervalMillis: Long = 0, providerHealthAutoExportWindowMillis: Long? = null, providerHealthAutoExportFormat: String = "json", providerHealthAutoExportRetainCount: Int = 5, providerHealthAutoExportIncludeScopeSuffix: Boolean = false, providerHealthAutoExportPushUrl: String? = null, providerHealthAutoExportPushFormat: String = "json", providerHealthAutoExportPushTimeoutMillis: Long, providerHealthAutoExportPushHeaders: Map<String, String> = emptyMap(), providerHealthAutoExportPushMaxRetries: Int = 2, providerHealthAutoExportPushRetryBackoffMillis: Long = 250, providerHealthAutoExportPushDeadLetterPath: String? = null, providerHealthAutoExportPushDeadLetterRetainCount: Int = 5, providerHealthAutoExportPushAsyncEnabled: Boolean = false, providerHealthAutoExportPushQueueCapacity: Int = 32, providerHealthAutoExportPushDropOldestOnOverflow: Boolean = true, providerHealthAutoExportPushHmacSecret: String? = null, providerHealthAutoExportPushHmacHeaderName: String = "X-Rag-Signature", providerHealthAutoExportPushTimestampHeaderName: String = "X-Rag-Timestamp", chunkerType: String = "basic", basicMaxChars: Int = 1800, basicOverlapChars: Int = 200, slidingWindowSize: Int = 240, slidingOverlap: Int = 40, adaptiveSectionRegex: String = com.ainsoft.rag.chunking.Chunkers.DEFAULT_ADAPTIVE_SECTION_REGEX, adaptiveMinChunkSize: Int = 200, adaptiveMaxChunkSize: Int = 1000, regexSplitPattern: String = "(?m)^##?", regexGroupByPattern: String? = null, embeddingDimensions: Int = 256, embeddingProvider: String = "hash", openAiApiKey: String? = null, openAiModel: String = "text-embedding-3-small", openAiBaseUrl: String = "https://api.openai.com/v1")

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val basicMaxChars: Int = 1800
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val openAiApiKey: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rerankerAlpha: Double = 0.65
Link copied to clipboard
Link copied to clipboard
val rerankerApiKey: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rerankerTopN: Int = 24
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard