convez.ai
MCP Server
madhavmadupu

prism-agentic-rag

madhavmadupu/prism-agentic-rag

Ver no GitHub
InicialPluginScore · de 0 a 100

P.R.I.S.M. is a production-grade, multimodal, agentic Retrieval-Augmented Generation (RAG) platform engineered for high-stakes financial intelligence.

Instalação

$npx convez-ai madhavmadupu/prism-agentic-rag

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
2

README

A tradução para o português deste README ainda está na fila.

P.R.I.S.M.

Pipeline for Retrieval, Inference, & Structured Memory

Python 3.11+ License: MIT FastAPI RAGAS Faithfulness LangGraph Neo4j Pinecone Cohere Redis Code style: ruff

P.R.I.S.M. is a production-grade, multimodal, agentic Retrieval-Augmented Generation (RAG) platform engineered for high-stakes financial intelligence. It integrates Agentic Routing, GraphRAG (Structured Memory), Corrective RAG (CRAG), and Model Context Protocol (MCP) to deliver autonomous, self-correcting, and real-time market insights.


Core Architectural Pillars

PillarTechnologyWhat It Does
Agentic OrchestrationLangGraphDynamically decomposes queries and routes them to the optimal retrieval modality
Structured MemoryNeo4j GraphRAGMulti-hop reasoning across company relationships and executive backgrounds
Contextual RetrievalPinecone + Cohere Rerank v3Hybrid vector search with precision-boosting reranking
Truthful InferenceCorrective RAG (CRAG)Self-reflective verification loop with confidence scoring
Multimodal ExtractionGPT-4o VisionParses financial charts, tables, and PDF pages
Live DataMCP / Yahoo FinanceReal-time stock prices, P/E ratios, and financial metrics
Production ObservabilityRAGAS + Redis CacheAutomated evaluation + semantic caching for 40% cost reduction

V1.0 Performance Metrics

MetricIndustry BaselineP.R.I.S.M. TargetStatus
RAGAS Faithfulness~0.75> 0.90Built
RAGAS Context Precision~0.70> 0.85Built
Answer Relevancy~0.75> 0.88Built
Hallucination Rate~15%< 5%Built (CRAG loop)
P95 Latency~4.5s< 2.5sBuilt
Cost per Query~$0.025< $0.015Built (Redis cache)

System Architecture

graph TD
    A[Streamlit UI / API] --> B[FastAPI Gateway]
    B --> C{Agentic Router<br/>LangGraph}

    C -->|Relational| D[Neo4j GraphRAG]
    C -->|Semantic| E[Pinecone + Cohere Rerank]
    C -->|Real-time| F[Yahoo Finance MCP]
    C -->|Visual| G[GPT-4o Vision]

    D --> H[Context Aggregator]
    E --> H
    F --> H
    G --> H

    H --> I{CRAG Loop<br/>Self-Reflection}
    I -->|Confidence < 0.7| C
    I -->|Confidence >= 0.7| J[GPT-4o Inference]

    J --> K[Guardrails & Citation]
    K --> L[Response]

    M[RAGAS] -.->|Evaluation| H
    N[Redis] -.->|Semantic Cache| B

Quick Start

git clone https://github.com/yourusername/prism-ai.git
cd prism-ai

cp .env.example .env
# Edit .env with your API keys (see docs/setup.md)

# Start all services
docker-compose up --build

# Or run locally
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn src.main:app --reload
ServiceURLDescription
API Docshttp://localhost:8000/docsSwagger UI
Streamlit UIhttp://localhost:8501Interactive frontend
Neo4j Browserhttp://localhost:7474Graph database UI
Redisredis://localhost:6379Semantic cache

Project Structure

├── src/
│   ├── main.py                 # FastAPI entry point
│   ├── config.py               # Environment config (pydantic-settings)
│   ├── api/                    # REST API routes & Pydantic models
│   ├── agents/                 # LangGraph state machine & nodes
│   ├── graph/                  # Neo4j client, schema, Cypher generator
│   ├── ingestion/              # Chunking, Cohere embeddings, Pinecone ingest
│   ├── retrieval/              # Vector search & Cohere reranking
│   ├── multimodal/             # GPT-4o Vision extraction
│   ├── mcp_servers/            # Yahoo Finance MCP server
│   ├── cache/                  # Redis semantic caching
│   ├── evaluation/             # RAGAS metrics & golden dataset
│   └── middleware/              # Rate limiting & input sanitization
├── frontend/
│   └── streamlit_app.py        # Interactive query UI
├── docs/                       # Architecture & integration docs
├── tests/                      # 40+ test cases
├── docker-compose.yml          # API + Redis + Neo4j
└── Dockerfile                  # Multi-stage Python 3.11

Documentation

DocumentDescription
Setup GuideEnvironment config, Docker, local dev
Agent ArchitectureLangGraph state machine, CRAG loop
Graph SchemaNeo4j nodes, relationships, example queries
MCP IntegrationYahoo Finance server, tool registration
EvaluationRAGAS metrics, golden dataset, caching

Tech Stack

LayerTechnologyPurpose
OrchestrationLangGraph 0.2+Stateful, cyclical agentic workflows
Vector StorePinecone 5.0+Managed low-latency hybrid search
Knowledge GraphNeo4j 5.20+Multi-hop entity relationship queries
EmbeddingsCohere Embed v3Dense vector embeddings
RerankingCohere Rerank v3Precision boost (+20-30%)
LLMGPT-4oReasoning, tool-calling, vision
BackendFastAPI / Python 3.11High-performance async API
CachingRedis 7Semantic similarity caching
EvaluationRAGAS 0.2+Faithfulness, precision, recall metrics
FrontendStreamlit 1.38+Interactive chat UI
InfrastructureDocker, ComposeReproducible deployment

License

MIT License. See LICENSE for details.


P.R.I.S.M. demonstrates the next generation of enterprise AI systems. 16 components, 40+ test cases, 6-phase architecture.

Ver o original no GitHub

Bom para

Relacionados