Skip to content

Feature Request: Streamlit Chat UI for Local Testing #7

@ma3u

Description

@ma3u

🎯 Feature Request: Streamlit Chat UI for Local Testing

Problem Statement

Currently, testing the Neo4j RAG + BitNet LLM system requires manual API calls or command-line scripts. We need a user-friendly chat interface for local testing and development that makes it easy to:

  • Interact with the RAG system conversationally
  • Upload documents to the knowledge base
  • Monitor system performance in real-time
  • Test the complete pipeline end-to-end

Proposed Solution

Implement a Streamlit-based chat interface that provides:

Core Features

  • Interactive Chat: Full conversation interface with message history
  • Document Upload: Drag-and-drop file upload for PDF, TXT, MD, DOCX files
  • System Monitoring: Real-time statistics and health indicators
  • Configuration Panel: Adjustable search parameters and model settings

Technical Implementation

  • Framework: Streamlit with chat components (st.chat_message, st.chat_input)
  • Streaming Responses: Typewriter effect using st.write_stream
  • File Processing: Integration with RAG service upload endpoints
  • Error Handling: Graceful degradation when services are offline

Architecture

graph TB
    subgraph "Streamlit Frontend (Port 8501)"
        A[👤 User] --> B[💬 Chat Interface]
        A --> C[📤 File Upload]
        A --> D[📊 System Monitor]
    end
    
    subgraph "Backend Services"
        B --> E[🔄 RAG Service API<br/>Port 8000]
        C --> E
        D --> E
        
        E --> F[🔍 /query endpoint]
        E --> G[📤 /upload endpoint]
        E --> H[📊 /health & /stats endpoints]
    end
    
    subgraph "Data & LLM Layer"
        F --> I[🗃️ Neo4j Database<br/>Port 7687]
        F --> J[🧠 BitNet LLM<br/>Port 8001]
        G --> I
        H --> I
        H --> J
    end
    
    I --> K[📝 Retrieved Context]
    J --> L[🤖 Generated Response]
    K --> M[✨ Combined Answer]
    L --> M
    M --> B
    
    style A fill:#e3f2fd
    style B fill:#f3e5f5
    style C fill:#f3e5f5
    style D fill:#f3e5f5
    style E fill:#fff3e0
    style I fill:#e8f5e8
    style J fill:#e8f5e8
    style M fill:#fff3e0
Loading

Success Criteria

  • Chat interface accepts and displays messages
  • Document upload processes files successfully
  • System statistics update in real-time
  • Responses stream with smooth typewriter effect
  • Error handling works for service failures
  • Performance meets benchmarks (< 2s response time)

Implementation Timeline

Estimated Effort: 5-7 days
Priority: High - Essential for local testing and development

Related Issues

This issue encompasses the main chat interface implementation. Related issues:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions