I build AI applications that connect LLMs, retrieval, tools, and software people can use. I bring 4 years of professional engineering experience across Python AI workflows and full-stack product engineering with React, Next.js, Node.js, and Express.
- Target role: AI Engineer / Generative AI Engineer
- Currently building: Self-Driving Data Analyst
- Focus: RAG, agent orchestration, safe tool use, evaluation, AI APIs, and backend systems
- Based in: New Delhi, India
Architecture for a real assistant
ββ durgesh-ai / assistant-preview βββββββββββββββββββββββββββ
β visitor βΊ What does Durgesh build? β
β agent βΊ Reliable LLM applications, RAG, and workflows β
β with validation, evidence, and observability. β
β β
β visitor βΊ What happens before a tool runs? β
β agent βΊ Authenticate β authorize β plan β validate β β
β execute β evaluate β trace. β
β β
β mode: README preview Β· live chat: deployment required β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The design below is intentionally larger than a simple prompt-to-response chain. It separates the control plane, data plane, policy decisions, and quality feedback loop.
flowchart TB
U["User / client"] --> G["API gateway
Auth Β· rate limit Β· request ID"]
G --> O["AI orchestrator
LangGraph state machine"]
O --> C["Context plane
Schema Β· metrics Β· documents"]
O --> T["Tool plane
SQL Β· retrieval Β· approved APIs"]
O --> P["Policy plane
Guardrails Β· permissions Β· budgets"]
T --> D["Data systems
MySQL Β· vector store Β· services"]
O --> R["Response composer
Evidence Β· assumptions Β· status"]
R --> G
O --> M["Observability
Traces Β· metrics Β· audit events"]
M --> E["Evaluation loop
Regression Β· quality Β· safety"]
E --> O
Request path: client β gateway β orchestrator β context and tools β policy checks β evidence-backed response.
Feedback path: traces β offline evaluation β regression cases β safer prompts, policies, and graph edges.
flowchart TD
A["Receive request"] --> B["Validate schema
principal Β· tenant Β· budget"]
B --> C["Classify intent
answer Β· clarify Β· refuse"]
C -->|clarify| Z["Ask focused question"]
C -->|answer| D["Retrieve permitted context"]
D --> E["Plan typed actions
metric Β· filters Β· tool"]
E --> F["Check authorization
resource and field scope"]
F -->|denied| Z2["Safe refusal + trace"]
F -->|allowed| H["Check exact-result cache"]
H -->|hit| I["Validate cache scope + freshness"]
H -->|miss| J["Generate tool call"]
J --> K["Deterministic guardrail
AST Β· schema Β· row/time caps"]
K -->|fail| L["Bounded repair
max two attempts"]
L --> J
K -->|pass| N["Execute read-only tool"]
N -->|transient| Q["Retry with deadline"]
Q --> N
N -->|rows| I2["Normalize evidence"]
I --> I2
I2 --> S["Synthesize answer
claims linked to evidence"]
S --> V["Output validator
format Β· leakage Β· citations"]
V --> W["Response + trace ID"]
B --> X["Metrics, logs, traces, cost"]
C --> X
K --> X
N --> X
V --> X
| Layer | Responsibility | Production control |
|---|---|---|
| Gateway | Identity, quotas, request IDs, payload limits | Auth middleware, rate limits, abuse protection |
| Orchestrator | State transitions and tool sequencing | Typed state, deadlines, idempotency, bounded retries |
| Context plane | Retrieve only relevant approved context | Versioned metadata, tenant filters, token budget |
| Policy plane | Decide what may be generated or executed | AST checks, allowlists, least privilege, output validation |
| Tool plane | Execute constrained actions | Read-only credentials, timeouts, row limits, sandboxing |
| Quality plane | Measure behavior over time | Golden set, adversarial tests, drift checks, release gates |
Guardrails and security
- Authenticate before retrieval; derive tenant and permissions from trusted claims.
- Treat user text, retrieved documents, schema comments, and sample values as untrusted.
- Allow only typed tools and approved resources; never expose unrestricted shell or network access.
- Parse generated SQL into an AST; reject DDL, DML, multi-statement payloads, system tables, and disallowed columns.
- Use parameter binding, read-only database principals, row limits, timeouts, and result-size caps.
- Validate the final answer for authorization, unsupported claims, sensitive data, and missing evidence.
Cache and performance
- Cache successful bounded results only; never cache denials or internal errors.
- Key results by tenant, permission scope, datasource, normalized query, typed parameters, schema version, metric version, and policy version.
- Re-check authorization before every cache read; a cache hit never bypasses policy.
- Use freshness-aware TTLs and invalidate on schema or metric changes.
- Track cold-cache and warm-cache latency separately; protect the database with admission control and connection-pool limits.
Evaluation and release gates
- Dataset: synthetic fixtures, hand-reviewed cases, ambiguity, adversarial prompts, empty results, and large results.
- Quality: parse validity, execution accuracy, result-set correctness, metric/filter correctness, faithfulness, and evidence completeness.
- Safety: policy precision/recall, unsafe execution rate, authorization leakage, prompt-injection resistance, and cache-scope isolation.
- Operations: p50/p95 latency, time to first token, tokens/request, cost/request, retries, timeouts, and provider/database saturation.
- Release gate: publish the dataset, model, prompt, schema, dependency, commit SHA, and cold/warm cache conditions with every result.
Observability and failure handling
- Trace every graph node with request ID, duration, model, token usage, cache status, policy result, and tool fingerprint.
- Redact prompts, row values, secrets, and personally identifying data from default logs.
- Retry only transient failures and never reset the request deadline.
- Use circuit breakers for provider/database outages, structured error classes, and explicit partial-result states.
- Turn reviewed failures into regression cases before changing prompts or graph edges.
|
Natural-language analytics with an explicit target architecture for schema retrieval, SQL policy checks, read-only execution, evidence-grounded answers, scoped caching, and evaluation. Current: Python Β· LangGraph Β· Gemini |
Agent workflow combining fleet telemetry, corridor weather, and logistics SOP documents to produce an operational summary and action plan. Stack: Python Β· LangGraph Β· LangChain Β· SQL Server Β· Pinecone Β· Streamlit |
01 Β· AI engineering and LLM systems
LLM applications Β· agent orchestration Β· RAG pipelines Β· embeddings Β· hybrid retrieval Β· prompt design Β· tool calling Β· structured outputs Β· SQL agents Β· evaluation harnesses Β· guardrails Β· caching Β· tracing
02 Β· JavaScript and frontend systems
JavaScript Β· TypeScript Β· React Β· Next.js Β· responsive interfaces Β· SCSS modules Β· GSAP motion Β· accessibility Β· SEO-friendly rendering Β· API integration Β· component systems
03 Β· Backend, data, and delivery
REST APIs Β· FastAPI Β· Node.js Β· Express Β· SQL Server Β· MySQL Β· MongoDB Β· Pinecone Β· Docker Β· Git Β· GitHub Β· authentication Β· rate limiting Β· logging Β· CI/CD fundamentals
Building AI features that are inspectable, testable, and useful beyond a demo.

