Add AI Chat assistant for conversational EA landscape queries#329
Closed
vincentmakes wants to merge 7 commits intomainfrom
Closed
Add AI Chat assistant for conversational EA landscape queries#329vincentmakes wants to merge 7 commits intomainfrom
vincentmakes wants to merge 7 commits intomainfrom
Conversation
Introduces a privacy-first AI chat feature that lets users ask natural language questions about their enterprise architecture landscape. The chat streams responses from the local Ollama LLM with context built from cards, relations, metamodel data, and landscape statistics. Key design decisions: - Conversations are session-only (never persisted to DB) - All LLM inference runs locally — no data leaves infrastructure - Context is built from permission-filtered DB queries - Streaming SSE responses for real-time token display - New ai.chat permission (granted to admin/bpm_admin/member) Backend: POST /ai/chat (streaming SSE), GET /ai/chat/status Frontend: AiChatDrawer with FAB trigger, markdown rendering, suggested questions, privacy badge, and stop/clear controls https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
Reorganize AiAdmin.tsx into three sections: Provider, Descriptions, and Chat. Add chat_enabled setting to backend AI config so admins can toggle the chat feature independently of the main AI toggle. Fix 500 error in chat context builder by replacing SQLAlchemy Float cast with Python-side rounding for avg data quality. https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
Move the descriptions toggle from the Provider section into the AI Descriptions section, with its own Active/Off status chip. Backend now stores descriptionsEnabled separately so descriptions and chat can be toggled independently once the provider is connected. https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
Show info hints in Descriptions and Chat sections recommending gemma3:4b (~3 GB) for descriptions and gemma3:27b (~17 GB) for chat to help admins choose the right model for each feature. https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
The main toggle now reads "AI capabilities are enabled" instead of "AI suggestions are enabled" since it gates both descriptions and chat. Since the backend exclusively uses Ollama API endpoints, replace all generic "LLM provider" references with "Ollama" for clarity. https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
Replace gemma3:27b recommendation with qwen2.5:7b which fits on most consumer GPUs with 6+ GB VRAM (e.g. GTX 1660 Ti). https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
The chat assistant now understands what the user is asking about and
provides targeted data instead of relying solely on keyword name matching.
Key capabilities added:
- Intent detection: recognises card type references ("IT components",
"applications"), lifecycle/EOL phrases, time windows ("next 12 months"),
cross-relation patterns ("which apps have components reaching EOL"),
and analytical queries ("how many", "list all")
- Type-aware fetching: fetches all cards of a referenced type
- Lifecycle filtering: queries cards by endOfLife/phaseOut dates within
a detected time window
- Relation traversal: follows relations between card types to answer
cross-type questions (e.g. ITComponent → Application via relAppToITC)
- Higher context limits (50 cards) for analytical questions
- Enhanced system prompt with lifecycle and relation interpretation rules
https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a privacy-first AI chat feature that lets users ask natural
language questions about their enterprise architecture landscape. The
chat streams responses from the local Ollama LLM with context built
from cards, relations, metamodel data, and landscape statistics.
Key design decisions:
Backend: POST /ai/chat (streaming SSE), GET /ai/chat/status
Frontend: AiChatDrawer with FAB trigger, markdown rendering,
suggested questions, privacy badge, and stop/clear controls
https://claude.ai/code/session_01KGZhgVoJpyX5EaQB7Ss4Mw