RAG Inspection Workstation · Mode B (Verifiable Sandbox)Curated Evidence Active · No Live InferenceLangChain + FAISS CPU FlatL2

FinBrief — Verifiable RAG Inspection Lab

Interactive retrieval-augmented generation inspection workbench demonstrating document chunking, FAISS vector indexing, prompt context assembly, and citation attribution using verified project evidence.

RAG Pipeline Parameters & Ground Truth

Ingestion: UnstructuredURLLoader (max 3 URLs). Chunking: RecursiveCharacterTextSplitter (chunk_size=1000, chunk_overlap=200, separators=['\n\n', '\n', '.', ',']). Embeddings: OpenAIEmbeddings (text-embedding-ada-002, 1536 dimensions). Vector Store: FAISS CPU (IndexFlatL2, Euclidean distance d(q,c); binary index omitted from repo, numerical payload estimate omitted). Synthesis: RetrievalQAWithSourcesChain (Primary entry app.py invokes llm=OpenAI(temperature=0.9, max_tokens=500); historical runtime model not independently verifiable from retained execution artifacts, depending on LangChain dependency version: text-davinci-003 under requirement.txt vs gpt-3.5-turbo-instruct under requirements.txt. Alternate script: backup.py).

Audit Boundary & Strict Non-Fabrication Gate

Verified Chunks: 10 authentic chunks extracted from vector_index_data.pkl (Cluster 1: 1 indexed source, 5 chunks; Cluster 2: 1 indexed source, 1 documented link, 5 chunks; Cluster 3: 2 documented links). Non-Fabrication Gate: Historical runtime query traces, similarity distance scores, and LLM generated answers were executed in-memory by Streamlit without persistence and were not logged to disk. No synthetic queries or fake distances are manufactured. Security Boundaries: Arbitrary URL scraping, live paid OpenAI API execution, and unsafe pickle deserialization are disabled. Plaintext API key purged.

1. Select Sourced Evidence Cluster

Active Cluster: Market Equity & Tech Valuation

Stage Inspection:Chunking & Splitter

Target: Wall Street rises as Tesla soars on AI optimism
Select Chunk:
Chunk Identifierchunk-tesla-dojo-00
Character Length999 / 1,000 max
Character Offsets[start, end)
[0, 999)
Context Overlap0 chars (Document Origin)
Verbatim Chunk Text (vector_index_data.pkl)
999 characters
English Hindi Gujarati Specials Hello, Login Hello, Login Log-inor Sign-Up My Account My Profile My Portfolio My Watchlist FREE Credit Score₹100 Cash Reward Fixed Deposits My Alerts My Messages Price Alerts My Profile My PRO My Portfolio My Watchlist FREE Credit Score₹100 Cash Reward Fixed Deposits My Alerts My Messages Price Alerts Logout Chat with Us Download App Follow us on: Go Ad-Free My Alerts >-> Go PRO @₹99 PRO Business Markets Stocks Economy Companies Trends IPO Opinion EV Special HomeNewsBusinessMarketsWall Street rises as Tesla soars on AI optimism Trending Topics Sensex TodaySEBI F&O NewsVodafone Idea Share PricePC Jeweller Share PriceDiffusion Engineers IPO Allotment status Wall Street rises as Tesla soars on AI optimism Tesla (TSLA.O) rallied 10% after Morgan Stanley upgraded the electric car maker to "overweight" from "equal-weight," saying its Dojo supercomputer could boost the company's market value by nearly $600 billion.
Chunk Metadata Source:https://www.moneycontrol.com/news/business/markets/wall-street-rises-as-tesla-soars-on-ai-optimism-11351111.html
Chunking Architecture & Boundary Trade-Offs

Recursive Splitting Strategy: The pipeline applies recursive separators in sequence: ["\n\n", "\n", ".", ","]. It seeks natural paragraph boundaries first, falling back to line breaks and sentence periods to keep total chunk size under 1,000 characters.

Financial Domain Vulnerability: While 1,000 characters with 200 overlap preserves prose context well, character-based splitters risk slicing financial tables, balance sheets, and numerical figures in half across chunk boundaries. Production financial RAG requires layout-aware or markdown table-aware chunking to preserve tabular integrity.