π SRAG
Support Request RAG System
Semantic search over your Jira support history.
SRAG is a Retrieval-Augmented Generation system built for IT support teams who need to search years of historical support tickets and email threads using natural language. Rather than grepping for keywords, SRAG lets you ask "What caused the certificate renewal failures in 2025?" and receive a grounded, cited answer drawn directly from your Jira support history.
The ingestion pipeline connects to your Jira instance via API, downloads each support ticket with its .msg email attachments, parses the full email thread (headers, body, HTML stripped), splits everything into overlapping text chunks, and generates 768-dimensional pgvector embeddings via the configured embedding model. Every chunk lands in PostgreSQL with its vector, source type, and ticket key β ready for millisecond-latency similarity search.
At query time you type a natural language question. SRAG embeds the query using the same model, runs a cosine similarity search over the full chunk corpus, retrieves the top matches, and optionally synthesises a plain-language answer via LLM β citing ticket keys inline so you can trace every claim back to its source ticket.
Capture at 1280px: ingestion browser, query results, ledger view.
Everything You Need to Mine Support History
Paste a Jira key to fetch the ticket, parse .msg email attachments, chunk all content, and embed into pgvector. Tracks status per ticket in the ingestion ledger.
Ask natural language questions. Results are ranked by cosine similarity with a clickable slideout showing full chunk text, Jira link, email metadata, and an AI-synthesised answer citing ticket keys.
Browse, filter, and inspect every text chunk in the database. Filter by content search, Jira key, chunk type, or embedding status. Slideout shows full chunk text. Supports single and bulk delete, CSV export.
Live corpus stats (tickets, chunks, vectors, pending) plus service connectivity checks for Jira API, Ollama embedder, database, and pgvector. Refresh on demand.
Auto-fetches tickets via the Jira REST API. Captures summary, description, status, priority, reporter, and all comment threads. Ingestion is idempotent β re-ingesting a ticket updates without duplicating.
Downloads .msg email attachments from each ticket and parses them using the msg-parser library. Extracts sender, recipients, date, subject, and full body text with HTML stripped β including nested quoted replies.
Each chunk is embedded into a 768-dimensional vector and stored in PostgreSQL using pgvector. Supports cosine similarity search with no external search infrastructure β everything lives in your existing Supabase database.
Ask questions in plain English. SRAG embeds the query, performs nearest-neighbour search, retrieves the top-10 most similar chunks, and returns ranked results with source ticket keys and relevance scores. Click any result row for a full detail slideout.
After updating the embedding model, use the re-embed endpoint to regenerate all vectors in bulk. Chunks with missing or stale embeddings are tracked via a pending_embedding flag and retried automatically.
Every ingested ticket is tracked in the ledger with its status (pending / complete / error), chunk count, embedding count, and last error message. Browse the full ingestion history from the app dashboard.
Three Steps From Ticket to Answer
SRAG implements a standard RAG pipeline optimised for structured support tickets and unstructured email bodies attached as .msg files.
Ingest
Paste a Jira ticket key or run auto-mode across your backlog. SRAG fetches the ticket via REST API, downloads .msg attachments, parses the email thread, and splits all content into overlapping chunks. Status is written to srag_ingest_ledger.
Embed
Each text chunk is sent to the configured embedding model to produce a 768-dimensional vector. Vectors are stored in srag_chunks via pgvector. Pending embeddings are retried via POST /api/reembed.
Query
Enter a natural language question. SRAG embeds the query, runs cosine similarity search over srag_chunks, ranks the top results, and returns grounded answers with Jira key citations. Every query is logged to srag_query_log.
From Jira Ticket to Searchable Knowledge
Every ticket goes through a 5-stage pipeline before it becomes queryable. Understanding this pipeline explains exactly what data you can find, why semantic search works, and what the system cannot do.
ticket + attachments
status Β· priority
summary
from/to/date/subject
body text
strip HTML
overlapping segments
preserves context
across boundaries
via embedding model
captures semantic
meaning of text
text + vector stored
together per chunk
cosine search ready
Two Tables, One Purpose
All SRAG data lives in PostgreSQL (Supabase). No external search index, no Redis, no Elasticsearch. pgvector extends PostgreSQL to store and query embedding vectors directly alongside the original text.
VECTOR(n) column type
that stores a list of floating-point numbers (your embedding). The {'<=>'}' operator
computes cosine distance between any two vectors in a single SQL query β no external infrastructure needed.
All 31,695 chunk vectors live inside your existing Supabase database alongside the text they represent.
Why "Login Failed" Finds "Access Denied"
Keyword search matches exact words. Semantic search matches meaning. The same embedding model that compressed your ticket text into vectors also compresses your query β then the database finds the chunk vectors closest in direction.
768 numbers
cosine
distance
top 10
returned
You can verify in Jira directly.
- Conceptual questions ("What login errorsβ¦")
- Pattern discovery ("Common SSL problems")
- Phrasing variation ("can't access" finds "denied")
- Topic clustering ("all PPOB-related issues")
- Specific ticket lookups (use Jira for known keys)
- Exact counts ("how many tickets about X")
- Date ranges ("tickets from last month")
- Tickets not yet ingested
- Real-time status ("is ICISTWO-9000 open?")
- Negative queries ("tickets WITHOUT attachments")
Writing Queries That Work
Write queries as if you're asking a colleague who has read every ticket. Full sentences work better than keywords. The richer your question, the more precisely the embedding model can locate relevant chunks.
INGEST. EMBED. QUERY.
Build a semantic knowledge base from your support ticket history. Every ingested ticket makes the next answer better.
Launch App βPremier app β requires MelTuc account