← Back to home

Dr Doc

AI sidebar for dev docs: answer questions, fetch code snippets, and deep-link to exact sections.

Problem Statement

🚀Complete Project Description: Dr.Doc📋Project OverviewDr.Doc is a groundbreaking hybrid intelligence platform that fuses neural RAG (Retrieval-Augmented Generation) with symbolic MeTTa reasoning, creating the world’s first developer-centric AI assistant that delivers both deep contextual understanding and precise technical accuracy.🎯Mission Statement"To transform developer productivity by merging the power of neural and symbolic AI, offering accurate, contextual, and verifiable support for API documentation and development workflows."🎯Key Features & Innovations🧠Hybrid Intelligence (Core USP)Neural RAG: BGE embeddings + PostgreSQL PgVector for semantic search and understandingSymbolic MeTTa: Structured reasoning for precise pattern matching and logical inferenceUnified Pipeline: Neural and symbolic layers work together for robust, well-grounded answers🤖ASI:One IntegrationFetch.ai ASI:One Mini: Advanced LLM powering response generationContext-Aware Prompting: Optimized prompts enriched by hybrid intelligenceReal-Time Processing: Lightning-fast, sub-second response times💻Developer-First ExperienceModern Interface: Built with Next.js and Tailwind CSS, offering a sleek real-time chat UIRich Formatting: Markdown support, syntax highlighting, and interactive citationsSession Control: Persistent conversation history and backend health monitoring🔓Cost-Optimized ArchitectureFree Embeddings: Local BGE model eliminates external API costsSelf-Contained Stack: Minimal external dependencies beyond ASI:OneScalable Core: PostgreSQL + PgVector built for production-grade performance

Solution

🏗️ Project Architecture Overview📋High-Level System DesignethNewDelhi2025follows alayered architecturewithhybrid intelligencecombining neural RAG and symbolic MeTTa reasoning.🎯Core Architecture Principles1. Hybrid Intelligence DesignNeural Layer: Semantic understanding and contextual reasoningSymbolic Layer: Precise pattern recognition and logical reasoningUnified Interface: Combines both approaches for superior results2. Microservices ArchitectureFrontend Service: Next.js user interface and chat managementBackend Service: Python uAgents with HTTP API endpointsData Service: PostgreSQL with PgVector for knowledge storageIntelligence Service: BGE embeddings + MeTTa reasoning🔧System ComponentsFrontend LayerTechnology: Next.js with React and TypeScriptPurpose: User interface, real-time chat, session managementCommunication: HTTP API calls to backendBackend LayerTechnology: Python with uAgents frameworkPurpose: Agent orchestration, request processing, response generationFeatures: HTTP API endpoints, uAgent communication, hybrid intelligence coordinationIntelligence LayerNeural Component: BGE embeddings with vector similarity searchSymbolic Component: MeTTa knowledge base with pattern matchingIntegration: Unified query processing combining both approachesData LayerVector Database: PostgreSQL with PgVector extensionDocument Storage: Structured text and metadata storageKnowledge Base: MeTTa atoms and pattern definitions🔄Data Flow ArchitectureIngestion PipelineDocument Processing: Markdown files converted to structured textFact Extraction: MeTTa patterns extracted from documentationEmbedding Generation: BGE model creates vector representationsStorage: Data stored in PostgreSQL with vector indexingQuery Processing PipelineUser Input: Natural language questions from frontendDual Processing: Both neural and symbolic systems activatedContext Assembly: Retrieved documents and patterns combinedResponse Generation: ASI:One processes enhanced contextOutput Formatting: Structured response with citations🧠Intelligence ArchitectureNeural Intelligence (RAG)Embedding Model: BGE for semantic understandingVector Search: Cosine similarity matching in 768-dimensional spaceStrengths: Contextual understanding, fuzzy matching, semantic searchSymbolic Intelligence (MeTTa)Knowledge Base: Structured facts and patterns as MeTTa atomsPattern Matching: Logical reasoning and rule-based inferenceStrengths: Exact matching, logical consistency, verifiable factsHybrid IntegrationParallel Processing: Both systems query simultaneouslyContext Fusion: Neural context combined with symbolic patternsEnhanced Prompting: LLM receives both types of intelligence🚀Agent ArchitectureASI:One AgentRole: Primary agent for user interaction and response generationIntegration: Direct access to hybrid intelligence systemsCommunication: HTTP API and uAgent messaging protocolsSystem IntegrationRAG System: BGE embeddings + PostgreSQL vector searchMeTTa System: Hyperon MeTTa engine for symbolic reasoningUnified Processing: Combined neural and symbolic intelligence🔧Infrastructure ArchitectureDatabase DesignPrimary Database: PostgreSQL with PgVector extensionSchema: Documents table with content, metadata, and vector embeddingsScalability: Horizontal scaling with connection poolingDeployment ArchitectureContainerization: Docker containers for consistent deploymentService Discovery: Environment-based configurationMonitoring: Health checks and status monitoring🎯Scalability DesignHorizontal ScalingStateless Services: Backend services can scale independentlyLoad Distribution: Multiple agent instances for high availabilityPerformance Optimization: Lazy loading, batch processing, connection pooling🔄Integration ArchitectureExternal IntegrationsASI:One API: Fetch.ai's LLM service integrationBGE Model: Local embedding model for cost efficiencyHyperon MeTTa: Symbolic reasoning engine integrationInternal CommunicationHTTP APIs: RESTful communication between servicesAgent Messaging: uAgent protocol for agent-to-agent communicationError Handling: Comprehensive error handling and reporting🎪User Experience ArchitectureReal-Time InteractionWebSocket Support: Real-time chat interfaceSession Management: Persistent user sessionsStatus Monitoring: Live backend status and connection monitoringResponse ArchitectureRich Formatting: Markdown rendering with syntax highlightingCitation System: Clickable links to source documentationAccessibility: Screen reader support and keyboard navigationThis architecture enableshybrid intelligencethrough ascalable, maintainable platformthat combines neural and symbolic AI approaches.

Hackathon

ETHGlobal New Delhi

2025

Contributors