Configuration Guide
AutoSchemaKG uses several configuration classes to manage settings for different parts of the pipeline: knowledge graph construction, LLM generation, retrieval, and benchmarking.
Knowledge Graph Construction
The ProcessingConfig class controls the pipeline for extracting triples and generating concepts from text.
from atlas_rag.kg_construction.triple_config import ProcessingConfig
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
str |
Required |
Path to the model or model identifier. |
|
str |
Required |
Directory containing input text files. |
|
str |
Required |
Pattern to filter input files (e.g., “musique”). |
|
str |
|
Directory to save output files. |
|
int |
|
Batch size for triple extraction. |
|
int |
|
Batch size for concept generation. |
|
int |
|
Total number of shards for parallel triple extraction. |
|
int |
|
Current shard index for triple extraction. |
|
int |
|
Total number of shards for parallel concept generation. |
|
int |
|
Current shard index for concept generation. |
|
bool |
|
Enable debug logging. |
|
int |
|
Index to resume processing from. |
|
bool |
|
Whether to record processing metrics. |
|
int |
|
Number of parallel workers. (Useful in speeding up when using OpenAI API) |
|
bool |
|
Whether to remove spaces from documents during preprocessing. |
|
bool |
|
Allow empty results without raising errors. |
|
bool |
|
Whether to perform concept generation after triple extraction. |
|
bool |
|
Whether to deduplicate input text. |
|
str |
|
Path to custom triple extraction prompt. |
|
str |
|
Path to custom triple extraction schema. |
|
bool |
|
Enable benchmarking mode (e.g., for GPU hours). |
LLM Generation
The GenerationConfig class provides a unified interface for configuring LLM generation parameters across different backends (OpenAI, vLLM, HuggingFace, etc.).
from atlas_rag.llm_generator import GenerationConfig
Core Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Maximum number of tokens to generate. |
|
float |
|
Sampling temperature. |
|
float |
|
Nucleus sampling probability. |
|
int |
|
Top-k sampling. |
|
bool |
|
Whether to use sampling or greedy decoding. |
|
int |
|
Random seed for reproducibility. |
|
str/List[str] |
|
Stop sequences. |
Repetition Control
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
float |
|
Penalize new tokens based on their existing frequency (-2.0 to 2.0). |
|
float |
|
Penalize new tokens based on whether they appear in the text (-2.0 to 2.0). |
|
float |
|
Penalty for repeating tokens (typically 1.0-2.0). |
Advanced Sampling (vLLM/SGLang)
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
float |
|
Minimum probability threshold. |
|
bool |
|
Whether to use beam search. |
|
bool |
|
Whether to ignore the EOS token. |
|
bool |
|
Whether to skip special tokens in output. |
Guided Generation
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
Union[str, Dict] |
|
JSON schema for guided generation. |
|
str |
|
Regex pattern for guided generation. |
|
List[str] |
|
List of allowed choices. |
|
str |
|
Context-free grammar for guided generation. |
OpenAI Specific
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
Dict |
|
Format of the response (e.g., |
|
List[Dict] |
|
List of tools/functions. |
|
Union[str, Dict] |
|
Tool choice strategy. |
Retrieval & Inference
The InferenceConfig class controls the settings for the retrieval and reasoning pipeline.
from atlas_rag.retriever.inference_config import InferenceConfig
General Retrieval
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
str |
|
Dataset keyword. |
|
int |
|
Number of top passages/results to retrieve. |
Think on Graph (ToG)
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Whether to prune topics. |
|
float |
|
Temperature for exploration phase. |
|
float |
|
Temperature for reasoning phase. |
|
int |
|
Number of sentences to use for reasoning. |
|
bool |
|
Whether to remove unnecessary relationships. |
|
int |
|
Maximum depth for search. |
|
int |
|
Maximum width for search. |
HippoRAG 1&2
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Whether to filter edges. |
|
str |
|
Mode: |
|
float |
|
Weight adjustment factor. |
|
int |
|
Number of top edges to retrieve before filtering. |
|
int |
|
Number of top nodes to retrieve for graph exploration. |
|
float |
|
Damping factor for Presonalized PageRank (PPR). |
|
int |
|
Maximum iterations for PPR. |
|
float |
|
Tolerance for PPR convergence. |
Benchmarking
The BenchMarkConfig class configures the evaluation and benchmarking process.
from atlas_rag.evaluation.benchmark import BenchMarkConfig
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
str |
|
Name of the dataset. |
|
str |
|
Path to the question file. |
|
str |
|
Path to the graph file (unused in some contexts). |
|
bool |
|
Whether to include events in evaluation. |
|
bool |
|
Whether to include concepts in evaluation. |
|
str |
|
Model used for reading/answering. |
|
str |
|
Model used for encoding/embedding. |
|
int |
|
Number of samples to evaluate (-1 for all). |
|
int |
|
Maximum iterations for ReAct agent. |
|
str |
|
Directory to store results. |
|
bool |
|
Enable upper bound evaluation mode. |
|
int |
|
Number of top passages to retrieve for evaluation. |