Skip to content

Add AI Chat assistant for conversational EA landscape queries#329

Closed
vincentmakes wants to merge 7 commits intomainfrom
claude/explore-ai-features-HAAzW
Closed

Add AI Chat assistant for conversational EA landscape queries#329
vincentmakes wants to merge 7 commits intomainfrom
claude/explore-ai-features-HAAzW

Conversation

@vincentmakes
Copy link
Owner

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

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
@vincentmakes vincentmakes deleted the claude/explore-ai-features-HAAzW branch February 27, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants