---
title: "Logging and debugging"
manual: "AI Assistant"
version: "main"
source: "UserGuide/LoggingAndDebugging.rst"
rendered: "2026-10-03T14:54:45+00:00"
---

# Logging and debugging {#logging-and-debugging}

The backend module can show pipeline traces. Traces help answer questions such
as:

-   Which pipeline step was executed?
-   Which prompt was sent to the model?
-   Which query was used for retrieval?
-   Which context was available?
-   How many tokens were used?
-   Which step failed or returned unexpected output?

## Recommended debug workflow {#recommended-debug-workflow}

1.  Start with a single user query.
1.  Check the query optimizer request and response.
1.  Check retrieval results and metadata fields.
1.  Check the answer generator prompt.
1.  Verify whether frontend sources are present.
1.  Reduce or adjust context only after retrieval is correct.

## Runtime configuration {#runtime-configuration}

Set `Pipeline log mode` under **AI Assistant > Configuration**. `errors`
stores failed events; `verbose` stores complete traces, including pipeline
validation warnings. Inspect and filter those records under
**AI Assistant > Diagnostics**.

Optional PSR log output is written to `var/log/tx_aiassistant.log`. General
TYPO3 errors are normally available in `var/log/typo3_*.log`. Development
systems can log complete prompts and responses. Production systems should
minimize logging and mask sensitive content where possible.
