|
2 | 2 | trigger: always_on |
3 | 3 | --- |
4 | 4 |
|
5 | | -Always call the tool `retrieve_context_for_query` before answering to determine if sufficient local context is available. |
6 | | -Use `task_type=auto`, `max_tokens=3000`, `limit_entities=3`, `expand_deps=true`. |
7 | | - |
8 | | -In addition to context retrieval, you have access to specialized KnowCode tools: |
| 5 | +to determine if sufficient local context is available. |
| 6 | +When the user submits a query, use the following sources for generating the required context - |
| 7 | +1. Check the context window of the current chat session. If you need more context, |
| 8 | +2. Use the knowcode mcp tool `retrieve_context_for_query` with the following arguments: `task_type=auto`, `max_tokens=3000`, `limit_entities=3`, `expand_deps=true`. |
| 9 | +3. Consider using the other knowcode mcp tools (listed below) if relevant: |
9 | 10 | - `search_codebase`: Use to find code entities (functions, classes, modules) by name or pattern. |
10 | 11 | - `get_entity_context`: Use to get detailed context for a specific entity (source code, docstrings, callers/callees). |
11 | 12 | - `trace_calls`: Use to trace the call graph (callers or callees) for an entity up to N hops. |
12 | 13 |
|
13 | 14 | If `sufficiency_score >= 0.88` and `context_text` is non-empty, you may answer from the retrieved context alone to maximize efficiency. |
14 | | -If more information is needed, or if the score is low, use the other KnowCode tools or proceed with a full LLM answer. |
| 15 | +If more information is needed, or if the score is low, inform the user that you do not have a satisfactory answer to the query and stop. |
| 16 | + |
| 17 | +DO NOT use the external frontier LLMs (e.g. Gemini 3 Flash, Gemini 3 Pro, Claude Sonnet 4.5, Claud Opus 4.5, etc.) at all. |
0 commit comments