Overview#
During a live briefing on a developing financial crime investigation, a senior analyst poses a question the team cannot immediately answer: "Based on the transaction patterns we've reviewed, what's the most likely mechanism for the final fund extraction?" Rather than pausing the briefing, she opens an investigation-scoped chat session. The AI has full case context. Within seconds, it returns a structured analysis drawing on the actual transaction data, the entity relationships already mapped, and the patterns flagged during earlier analysis. The briefing continues.
The Chat domain makes that kind of real-time investigative dialogue possible. It maintains full conversation history, streams responses as they generate, and scopes AI context to the specific investigation when needed.
Key Features#
- Multi-Turn Dialogue: Maintains full conversation history across exchanges, enabling follow-up questions and contextual continuity throughout an analysis session.
- Session Management: Unique session tracking with token usage monitoring and investigation linking for organised, traceable AI interactions.
- Investigation Context: Conversations can be scoped to specific investigations, automatically incorporating case-specific data for more relevant AI responses.
- Streaming Responses: Real-time progressive output delivery provides better responsiveness for longer analytical responses.
- Token Usage Tracking: Accurate counting of tokens used per session and conversation for cost management and usage monitoring.
- Customisable System Prompts: Configurable AI behaviour and context through system prompts tailored to specific analysis domains.
- History Windowing: Intelligent context management limits conversation history to stay within processing limits while preserving the most relevant exchanges.
- Message Role Structure: Clear separation of system instructions, user queries, and AI responses for well-organised conversation flows.
- Graceful Error Handling: Streaming interruptions and processing errors are handled gracefully without losing conversation state.
Use Cases#
Investigators engage in multi-turn dialogue with the AI about case details, asking follow-up questions and receiving contextually aware analysis that builds on previous exchanges, making complex data exploration feel like a conversation rather than a series of database queries.
Analysts use investigation-scoped chat sessions to explore case data through natural language, asking questions like "What patterns do you see in the financial transactions?" with the AI drawing on full case context.
Briefing teams use streaming chat responses during live sessions to get real-time analytical input on investigation developments, with the AI response appearing progressively rather than after a long wait.
Data analysts leverage the chat interface to explore complex datasets through conversational queries, receiving structured analysis and recommendations without needing to know query syntax.
Integration#
The Chat domain connects to the platform's AI orchestration layer for model routing, the investigation domain for case context, the RAG (retrieval-augmented generation) system for document-aware responses, and the analysis tools for deeper analytical capabilities.
Open Standards#
- OpenAI Chat Completions message format: Conversation history is structured using the role/content message schema (system, user, assistant roles) defined by the OpenAI Chat Completions API, ensuring compatibility with any compliant LLM provider.
- Server-Sent Events (SSE, WHATWG EventSource / W3C): Streaming responses are delivered over HTTP with the
text/event-streammedia type, pushing incremental content chunks and a terminal[DONE]event to the client without requiring a persistent socket. - WebSocket Protocol (RFC 6455): A parallel real-time transport exposes bidirectional chat over a persistent WebSocket connection, supporting typing indicators, session room management, and in-message JWT authentication.
- JSON Web Token (RFC 7519): Every API request and WebSocket authentication message is authorised via a signed JWT; the service decodes and validates the token, enforces key-version (kver) revocation, and extracts tenant claims before processing.
- OAuth 2.0 Bearer Token Usage (RFC 6750): REST endpoints accept access tokens as HTTP Bearer credentials, with rate-limiting applied per user and per tenant derived from the verified token claims.
- RFC 4122 UUID: Sessions, users, organisations, and investigations are all identified by RFC 4122 version-4 UUIDs, providing globally unique, collision-resistant identifiers across distributed services.
- JSON (RFC 8259 / ECMA-404): All API request bodies, streaming event payloads, and AI response structures are serialised as JSON, including the structured next-steps suggestion output and JSONB session metadata stored in PostgreSQL.
Last Reviewed: 2026-02-05 Last Updated: 2026-04-14