Debugging
- When the ke_search_ai extension log level is set to DEBUG (Extension Manager → ke_search_ai →
- → Log level), the extension logs detailed information to help analyze the RAG pipeline:
- - Retrieval: The search term and the similarity scores of the top-k results (including UID and
- title of the indexed records) are logged to help analyze why certain records were chosen as context.
- - LLM API: Request (URL, model, max_tokens, system and user prompt; long text is truncated)
- and response (answer content, truncated if long). If the API returns token usage (e.g. Mistral, OpenAI), prompt_tokens, completion_tokens and total_tokens are logged to help estimate costs.
- - Embedding API: Request (URL, model, input length and a short preview of the text) and
- response (number of dimensions). If the API returns token usage, prompt_tokens and total_tokens are logged.
Log entries are written to the file var/log/ke_search_ai.log. API keys are never logged.
By default, the log level is set to WARNING, meaning only errors and warnings are recorded.