You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context Engine maintains pre-computed graph edges in dedicated Qdrant collections for fast symbol navigation. During indexing, call and import relationships are extracted and stored separately from code chunks.
137
+
138
+
-**Separate Collections**: Each base collection `<name>` has a companion `<name>_graph` collection
139
+
-**Payload-Only Storage**: Graph collections store edges as indexed payloads (no vectors)
140
+
-**Edge Types**:
141
+
-`calls`: Function/method call relationships
142
+
-`imports`: Module/symbol import relationships
143
+
144
+
**Edge Schema:**
145
+
```json
146
+
{
147
+
"caller_symbol": "process_data",
148
+
"callee_symbol": "validate_input",
149
+
"caller_path": "src/handlers/processor.py",
150
+
"edge_type": "calls",
151
+
"repo": "my-project",
152
+
"start_line": 45,
153
+
"language": "python"
154
+
}
155
+
```
156
+
157
+
The schema provides both granularity levels for agentic workflows:
158
+
-`caller_path`: File path for immediate agent action (view, edit)
159
+
-`caller_symbol`: Function/method name for understanding which function makes the call
160
+
161
+
**Fast Indexed Queries:**
162
+
-`get_callers(symbol)`: Find all files/functions that call a symbol
163
+
-`get_callees(symbol)`: Find all functions a symbol calls
164
+
-`get_importers(module)`: Find all files importing a module
165
+
166
+
**AST Analyzer** (`scripts/ast_analyzer.py`)
167
+
168
+
Tree-sitter-based multi-language AST analysis for semantic code understanding:
169
+
170
+
-**Symbol Extraction**: Functions, classes, methods with signatures, docstrings, decorators
171
+
-**Call Graph Construction**: Maps caller → callee relationships with enclosing function context
172
+
-**Dependency Tracking**: Extracts imports and module dependencies
173
+
-**Semantic Chunking**: Splits code at function/class boundaries (not arbitrary line counts)
-**Confidence Scoring**: Routes to appropriate search strategy based on query type
204
+
-**Keyword Fallback**: Pattern-based classification when embeddings unavailable
205
+
132
206
### 5. Learning Reranker System (Optional)
133
207
134
208
The Learning Reranker is an **optional** self-improving ranking system that learns from search patterns to provide increasingly relevant results over time. It is enabled by default but can be disabled via `RERANK_LEARNING=0` and `RERANK_EVENTS_ENABLED=0` environment variables. See [Configuration](CONFIGURATION.md#learning-reranker) for all options.
0 commit comments