Knowledge Graph
Knowledge graph search settings can be configured both server-side and at runtime. Runtime settings are passed as a dictionary to the search and RAG endpoints. You may refer to the search API documentation here for additional materials.
KGSearchSettings
use_kg_search
(bool): Whether to use knowledge graph searchkg_search_type
(str): Type of knowledge graph search (‘global’ or ‘local’)kg_search_level
(Optional[str]): Level of knowledge graph searchgeneration_config
(Optional[GenerationConfig]): Configuration for knowledge graph search generationentity_types
(list): Types of entities to search forrelationships
(list): Types of relationships to search formax_community_description_length
(int): Maximum length of community descriptions (default: 65536)max_llm_queries_for_global_search
(int): Maximum number of LLM queries for global search (default: 250)local_search_limits
(dict[str, int]): Limits for local search results by type
These settings provide fine-grained control over the search process in R2R, including vector search, hybrid search, and knowledge graph search configurations.