ES
joseph
Say hi ↗
ASK • QUERY • ANSWER • ASK • QUERY • ANSWER •
case 04 / 05

Velocity Oracle 

Natural language interface for querying complex enterprise Oracle databases.

Year
2024
Role
Backend lead · AI
Status
Private deployment · no public repo
( architecture )

How it's built

LangChainOracle DBFastAPIDockerpgvectorRedis
asksql▭Chat / Teamsclient◇FastAPIdocker · fargate✦LangChain Agentplanner◉Schema Indexpgvector✦LLMbedrockλSQL Guardread-only◉Oracle DBenterprise◉Rediscache
Hover a service to trace its connections
( the problem )

Analysts waited days for the database team to write SQL against hundreds of undocumented Oracle tables.

( the build )

A LangChain agent that retrieves the relevant schema from a vector index, drafts SQL, checks it against a read-only guard and explains the answer in plain language.

3 days
→ 20 seconds per query
640
tables indexed
0
writes allowed by the guard
( request flow )
  1. 01A question arrives from chat or Teams at the FastAPI gateway.
  2. 02The LangChain agent retrieves the relevant tables from pgvector.
  3. 03Generated SQL passes a read-only guard before touching Oracle.
  4. 04Results are cached in Redis and summarised back to the user.
velocity.console● live
3 days
→ 20 seconds per query
640
tables indexed
0
writes allowed by the guard
handler.py
1agent = create_sql_agent(
2 llm=llm, toolkit=OracleToolkit(
3 db=readonly_oracle),
4 retriever=schema_index)
5agent.run("top clients by margin q3")
6▍
main ✓Python · UTF-8 · Ln 6
Next case · 05
Aura Optimizer →