Author Archives: Raghunath Dayala

Vector DB

Vector DB అంటే ఏంటి?

సింపుల్‌గా చెప్పాలి అంటే, Vector DB అనేది meaning-based search కోసం use చేసే database. Normal database లేదా keyword search exact words మీద ఎక్కువ depend అవుతుంది. కానీ Vector DB words/sentences/documents యొక్క meaning ని numbers రూపంలో store చేసి, similar meaning ఉన్న content ని find చేస్తుంది.

Normal database ని ఇలా ఊహించుకో: నీ phone contacts లో “Ravi” అని search చేస్తే exact “Ravi” ఉంటే వస్తుంది. “Ravindra” లేదా “Ramesh” ఉంటే exact match లేకపోతే miss అవ్వచ్చు. కానీ Vector DB లో search exact word మీద మాత్రమే కాదు; meaning దగ్గరగా ఉందా లేదా అన్నది చూస్తుంది.

Example:

  • User search: “money back rules”
  • Document text: “Refund eligibility”
  • Exact words match కావు
  • But meaning same area లో ఉంది
  • Vector DB దీనిని similar గా identify చేయగలదు

అందుకే Vector DB ని semantic search engine లాగా కూడా చూడొచ్చు.


Traditional search problem ఏంటి?

Traditional keyword search లో user exact words type చేస్తే results బాగుంటాయి. But real users exact terminology use చేయరు.

Example company document లో ఇలా ఉంది:

Refund eligibility: Customers can request a full refund within 30 days of purchase if the product is unused.

User ఇలా అడగొచ్చు:

  • “money back rules ఏంటి?”
  • “product నచ్చకపోతే cash తిరిగి వస్తుందా?”
  • “కొన్న తర్వాత refund ఎలా తీసుకోవాలి?”
  • “return policy explain చేయి”

Keyword search “refund eligibility” అనే exact words కోసం చూస్తుంది. User “money back” అని type చేస్తే relevant document miss అవ్వచ్చు. ఈ gap ని solve చేయడానికి Vector DB useful.


Embeddings అంటే ఏంటి?

Embedding అంటే text meaning ని numbers list గా convert చేయడం. Machine కి text direct గా అర్థం కాదు. Machine numbers మీద operate చేస్తుంది. So text ని numerical representation గా మార్చాలి.

Example:

  • “dog” → [0.2, 0.8, 0.1, …]
  • “puppy” → [0.21, 0.79, 0.12, …]
  • “car” → [0.9, 0.1, 0.5, …]

ఇక్కడ “dog” and “puppy” meaning దగ్గరగా ఉంది కాబట్టి vectors కూడా close గా ఉంటాయి. “car” meaning different కాబట్టి vector space లో దూరంగా ఉంటుంది.

Important point:
ఈ numbers random కాదు. Embedding model text లోని meaning, context, relationships ని capture చేయడానికి train అయి ఉంటుంది.

Embedding models examples:

  • OpenAI embedding models
  • HuggingFace sentence-transformer models
  • Google embedding models
  • Cohere embeddings
  • Local embedding models

Vector అంటే actual గా ఏంటి?

Vector అంటే numbers list. Example:

[0.12, -0.45, 0.89, 0.03, ...]

Real embedding vectors లో hundreds లేదా thousands dimensions ఉండొచ్చు. For example 384, 768, 1536 dimensions లాంటి sizes common.

ప్రతి dimension directly “color”, “animal”, “refund” అని simple meaning represent చేయదు. Instead, model learned hidden features represent చేస్తుంది. మనం వాటిని human-readable గా interpret చేయలేము, but similarity calculation కి చాలా useful.


Vector DB లో ఏమి store చేస్తారు?

Usually Vector DB లో only vector మాత్రమే store చేయరు. Practical system లో ఈ items store చేస్తారు:

  1. Embedding vector — text meaning numbers రూపంలో
  2. Original text chunk — actual paragraph/sentence
  3. Source — document URL, page ID, file name, record ID
  4. Metadata — category, author, department, page number, tags
  5. Permissions — ఎవరు చూడగలరు, access level ఏంటి
  6. Timestamps — created date, updated date
  7. Version info — document latest version ఏది

Example record:

FieldExample
vector[0.12, 0.88, …]
text“Customers can request a refund within 30 days…”
sourcerefund_policy.pdf
metadatacategory: billing, page: 2
permissionsupport_team_only

Text chunks ఎందుకు చేస్తారు?

Full document ని ఒకే vector గా convert చేస్తే details dilute అవుతాయి. So document ని smaller pieces గా split చేస్తారు. వాటిని chunks అంటారు.

Example:

ఒక 20-page policy document ఉంటే, దాన్ని paragraphs లేదా sections గా split చేస్తారు:

  • Chunk 1: Refund eligibility
  • Chunk 2: Refund process
  • Chunk 3: Exceptions
  • Chunk 4: Contact support

ప్రతి chunk కి separate embedding create చేస్తారు. Search సమయంలో relevant chunk మాత్రమే retrieve అవుతుంది.

Chunking good గా చేయకపోతే problem:

  • Chunk too small అయితే context miss అవుతుంది
  • Chunk too large అయితే irrelevant text ఎక్కువ వస్తుంది
  • Overlap లేకపోతే sentence continuity break అవ్వచ్చు
  • Wrong section boundaries ఉంటే answer quality పడిపోతుంది

So RAG systems లో chunking strategy చాలా important.


Search ఎలా జరుగుతుంది? Step by step

User query: “money back rules ఏంటి?”

Step-by-step process:

  1. User query application కి వస్తుంది
  2. Same embedding model తో query ని vector గా convert చేస్తారు
  3. Vector DB లో stored vectors తో compare చేస్తారు
  4. Similarity score calculate చేస్తారు
  5. Top K closest chunks retrieve చేస్తారు
  6. Retrieved chunks ని LLM కి context గా ఇస్తారు
  7. LLM ఆ context ఆధారంగా final answer generate చేస్తుంది

ఇది RAG process లో retrieval part.


Similarity ఎలా calculate చేస్తారు?

Vector DB nearest vectors find చేయడానికి similarity metrics use చేస్తుంది.

Common methods:

  • Cosine similarity — direction similarity check చేస్తుంది
  • Euclidean distance — distance between points check చేస్తుంది
  • Dot product — vector alignment measure చేస్తుంది

Beginner level లో ఇలా గుర్తుపెట్టుకో:

Vectors దగ్గరగా ఉంటే meaning similar. Vectors దూరంగా ఉంటే meaning different.


RAG తో Vector DB relation ఏంటి?

RAG అంటే Retrieval-Augmented Generation.

Vector DB ఇందులో retrieval engine లాగా పని చేస్తుంది.

RAG flow:

  1. User question అడుగుతాడు
  2. Question embedding అవుతుంది
  3. Vector DB relevant chunks retrieve చేస్తుంది
  4. LLM కి question + chunks పంపుతారు
  5. LLM grounded answer generate చేస్తుంది

Without Vector DB, LLM guess చేయవచ్చు. With Vector DB, LLM trusted context ఆధారంగా answer ఇవ్వగలదు.

Example:

User: “Company లో maternity leave policy ఏంటి?”

  • LLM alone: guess చేయొచ్చు
  • RAG + Vector DB: actual HR policy document నుంచి relevant section retrieve చేసి answer ఇస్తుంది

Traditional DB vs Vector DB

AspectTraditional DBVector DB
Search typeExact match, filters, joinsSemantic similarity
Best forStructured dataUnstructured text/images/audio
Query exampleprice = 100“cheap laptop for students”
Data formatRows and columnsVectors + metadata
StrengthAccuracy for exact dataMeaning-based matching
WeaknessNatural language meaning weakExact transactional logic weak

Important: Vector DB traditional DB replacement కాదు. రెండింటి use cases different. Real applications లో రెండూ కలిసి work అవుతాయి.

Example:

  • SQL DB: user orders, payments, inventory
  • Vector DB: product docs, support articles, FAQs meaning search

Vector DB ఎందుకు suddenly popular అయింది?

LLMs popular అయిన తర్వాత, companies కి ఒక major problem వచ్చింది:

“మా private documents మీద ChatGPT లాగా answer ఇవ్వాలి. కానీ మా data model training లో లేదు.”

ఈ problem solve చేయడానికి RAG pattern popular అయింది. RAG కి semantic retrieval కావాలి. Semantic retrieval కి Vector DB useful. అందుకే Pinecone, Weaviate, Milvus, Chroma, Qdrant, FAISS వంటి tools popular అయ్యాయి.


Real use cases

1. Internal knowledge assistant

Company లో thousands of docs ఉంటాయి. Employee “expense reimbursement rules ఏంటి?” అని అడిగితే relevant finance policy retrieve చేసి answer ఇవ్వచ్చు.

2. Product documentation search

Software product help docs లో user natural language question అడుగుతాడు. Vector search relevant documentation page తీసుకొస్తుంది.

3. Customer support assistant

New support ticket వచ్చినప్పుడు, past similar tickets and solutions retrieve చేసి support agent కి suggest చేయచ్చు.

4. Legal document Q&A

Lawyers large contracts/case laws లో similar clauses search చేయచ్చు. Exact words different ఉన్నా meaning similar documents find చేయచ్చు.

5. Course recommendation

User: “Python beginner కి practical course కావాలి”
Vector DB course descriptions లో similar meaning search చేసి relevant courses suggest చేయచ్చు.

6. Resume matching

Job description embedding and candidate resume embeddings compare చేసి best matching candidates find చేయచ్చు.

7. Image/audio search

Vector DB text మాత్రమే కాదు. Images/audio కూడా embeddings గా convert చేస్తే similarity search చేయచ్చు. Example: similar product images, similar songs.


Vector DB tools examples

Popular options:

  • Pinecone — managed vector database
  • Weaviate — open-source + managed
  • Milvus — scalable open-source vector DB
  • Qdrant — high-performance vector search
  • Chroma — local/simple RAG projects కి beginner-friendly
  • FAISS — Facebook AI Similarity Search library
  • Postgres pgvector — Postgres లో vector search extension

Learning stage లో Chroma/FAISS/pgvector simple. Production scale లో Pinecone/Qdrant/Weaviate/Milvus consider చేయొచ్చు.


Common architecture

Typical RAG architecture ఇలా ఉంటుంది:

  1. Documents collect చేయడం
  2. Text extract and clean చేయడం
  3. Chunking చేయడం
  4. Embeddings create చేయడం
  5. Vector DB లో store చేయడం
  6. User query receive చేయడం
  7. Query embedding create చేయడం
  8. Vector DB నుంచి similar chunks retrieve చేయడం
  9. Prompt build చేయడం
  10. LLM answer generate చేయడం
  11. Answer with citations return చేయడం

Common mistakes

Mistake 1: Wrong chunk size

Too small chunks context miss చేస్తాయి. Too large chunks irrelevant content తీసుకువస్తాయి.

Mistake 2: Metadata ignore చేయడం

Metadata లేకపోతే filtering కష్టం. Example: latest policy only search చేయాలి అంటే date metadata కావాలి.

Mistake 3: Permissions ignore చేయడం

User కి access లేని document chunks retrieve అయితే security issue. Vector DB search లో permissions filtering must.

Mistake 4: Embedding model change చేసి re-index చేయకపోవడం

Documents ఒక embedding model తో store చేసి, queries another model తో embed చేస్తే similarity quality bad అవుతుంది.

Mistake 5: LLM కి too many chunks పంపడం

Too much context cost పెంచుతుంది and answer confuse చేయొచ్చు.


Limitations

Vector DB powerful అయినా perfect కాదు.

  • Similar meaning retrieve చేయగలదు, but truth verify చేయదు
  • Old documents ఉంటే wrong answer రావచ్చు
  • Bad embeddings అయితే bad retrieval
  • Ambiguous query అయితే irrelevant chunks రావచ్చు
  • Numerical filters and exact joins కి SQL DB better
  • Access control handle చేయకపోతే data leak risk
  • Large scale లో indexing, latency, cost manage చేయాలి

So Vector DB is one component only. Good RAG system కి data quality, chunking, metadata, permissions, prompts, evaluation అన్నీ అవసరం.


Simple analogy

Traditional search = dictionary లో exact word వెతకడం
Vector search = meaning అర్థం చేసుకుని related concept వెతకడం

ఇంకో analogy:

Traditional DB librarian కి “Refund Policy page number 2 ఇవ్వు” అని అడిగినట్టు.
Vector DB librarian కి “డబ్బులు తిరిగి వచ్చే rules ఎక్కడ ఉన్నాయి?” అని natural language లో అడిగితే, wording different అయినా correct section తీసుకురావడం.


Final mental model

Vector DB ని ఇలా గుర్తుపెట్టుకో:

Text/image/audio meaning ని numbers గా store చేసి, similar meaning ఉన్న content ని fast గా search చేసే database.

AI applications లో Vector DB mostly ఈ purpose కి use అవుతుంది:

  • LLM hallucination reduce చేయడం
  • Company/private data మీద answers ఇవ్వడం
  • Natural language search improve చేయడం
  • RAG systems build చేయడం
  • Similar documents/tickets/products find చేయడం

Simple గా చెప్పాలి అంటే: Vector DB అనేది AI కి “meaning-based memory search” లాంటిది.

Agentic AI Foundations

1. AI application vs AI model — difference ఏంటి?

సింపుల్‌గా చెప్పాలి అంటే, Gemini/ChatGPT లాంటి products are AI applications. వాటి లోపల ఒకటి లేదా ఎక్కువ AI models ఉంటాయి. Model answer generate చేయగలదు, కానీ complete application అవ్వడానికి UI, backend, login, payment, database, monitoring, rate limits, security, user history, file uploads, APIs — ఇవన్నీ కావాలి.

Model ని “brain” అనుకుంటే, application అనేది “brain + body + workflow + rules”. Brain ఒక్కటే ఉంటే user కి usable product రాదు.

ఎందుకు ఈ separation వచ్చింది?
Early software mostly rule-based. Developer every behavior code లో రాస్తారు. కానీ natural language questions కి fixed rules సరిపోవు. అందుకే AI model ని application లో ఒక intelligent component లాగా integrate చేయడం మొదలైంది.

ఎలా build చేస్తారు?

  1. Frontend user question తీసుకుంటుంది
  2. Backend ఆ request ని receive చేస్తుంది
  3. అవసరమైతే database/tools/RAG నుంచి context తెస్తుంది
  4. AI model కి prompt పంపుతుంది
  5. Model response ఇస్తుంది
  6. Application response ని format చేసి user కి చూపిస్తుంది

Use case:
Telusko chatbot లో user “AI course ఏది start చేయాలి?” అని అడిగితే, application user question తీసుకుని, Telusko course data fetch చేసి, model ద్వారా natural answer generate చేయాలి. Model alone random answer ఇవ్వచ్చు; application logic దాన్ని controlled answer గా మార్చుతుంది.

Real-world point:
Production AI app లో model quality మాత్రమే కాదు — latency, cost, privacy, fallback, logging, evaluation ఇవన్నీ equally important.

2. LLM prediction చేస్తుంది, database lookup కాదు

LLM అంటే Large Language Model. ఇది normal database లాగా exact row fetch చేయదు. ఇది text patterns నేర్చుకుని next token prediction చేస్తుంది. మన keyboard suggestions చిన్న scale లో ఎలా work అవుతాయో, LLM huge scale లో అలాగే but much more advanced గా work చేస్తుంది.

ఎందుకు develop చేయాల్సి వచ్చింది?
Human language చాలా flexible. “Python explain చేయి”, “Python అంటే ఏంటి?”, “Python beginner కి ఎలా చెప్తావు?” — meaning దగ్గరగా ఉన్నా wording different. ప్రతి possible wording కి code రాయడం impossible. అందుకే model ని huge examples మీద train చేసి language patterns నేర్పిస్తారు.

ఎలా చేస్తారు?

  1. Huge text corpus collect చేస్తారు
  2. Text ని tokens గా split చేస్తారు
  3. Model కి “given previous tokens, next token ఏమై ఉండొచ్చు?” అనే task మీద train చేస్తారు
  4. Training లో billions/trillions parameters adjust అవుతాయి
  5. Inference time లో user prompt చూసి next tokens generate చేస్తుంది

Important reasoning:
Model “understanding” అనేది human understanding లాంటిదా కాదా అనేది philosophical debate. Practical engineering view లో మాత్రం model patterns capture చేసి useful outputs ఇస్తుంది.

Use case:
User “resume summary improve చేయి” అంటే model grammar, tone, professional wording patterns use చేసి better summary generate చేస్తుంది.

3. Hallucination — confident గా wrong answer ఇవ్వడం

Hallucination అంటే AI confident గా wrong/fake answer ఇవ్వడం. ఇది “model bad” అని మాత్రమే కాదు; model design nature వల్ల వచ్చే limitation. Model truth verify చేయకుండా likely text generate చేస్తుంది.

ఎందుకు జరుగుతుంది?

  • Prompt లో enough context లేకపోవడం
  • Model training data లో fact లేకపోవడం
  • User question ambiguous గా ఉండడం
  • Model కి “answer తప్పనిసరిగా ఇవ్వాలి” అన్న pressure ఉండడం
  • External verification లేకపోవడం

ఎందుకు dangerous?

  • Medical/legal/finance domains లో wrong answer big risk
  • Company policy chatbot wrong policy చెప్పొచ్చు
  • Developer కి fake library/function suggest చేయొచ్చు
  • Student కి wrong concept confidently నేర్పొచ్చు

ఎలా handle చేస్తారు?

  • RAG: trusted documents నుంచి context ఇచ్చి answer చేయించడం
  • Tool calling: live API/database నుంచి facts తెప్పించడం
  • Prompt constraints: “Context లో లేకపోతే తెలియదు అని చెప్పు”
  • Citations: answer ఏ document మీద based ఉందో చూపించడం
  • Human review: high-risk outputs manual review చేయించడం
  • Validation: output schema, business rules, factual checks apply చేయడం

Use case:
Company HR bot “paid leave policy” గురించి answer ఇవ్వాలి. Base LLM మీద depend అయితే hallucination risk. HR policy PDF నుంచి RAG context retrieve చేసి answer చేస్తే grounded response వస్తుంది.

4. Knowledge cutoff and tool calling

Model ఒక time వరకు train అవుతుంది. ఆ తర్వాత జరిగిన events model memory లో ఉండవు. దీనినే knowledge cutoff అంటారు. కానీ tools ఉంటే model live information తీసుకోగలదు.

Tool calling అంటే ఏంటి?
LLM కి outside systems ని call చేసే ability ఇవ్వడం. Model “నాకు current date కావాలి”, “calendar check చేయాలి”, “database query చేయాలి”, “calculator use చేయాలి” అని decide చేసి tool call చేస్తుంది.

ఎందుకు develop చేయాల్సి వచ్చింది?

  • World data changes every second
  • Model retrain చేయడం costly and slow
  • Company private data model training లో ఉండదు
  • Some tasks require action, not just answer

ఎలా works?

  1. User request వస్తుంది
  2. Model intent అర్థం చేసుకుంటుంది
  3. Available tools list చూస్తుంది
  4. సరైన tool choose చేస్తుంది
  5. Tool కి structured input ఇస్తుంది
  6. Tool result తిరిగి model కి వస్తుంది
  7. Model final answer/action చేస్తుంది

Use cases:

  • “నా next meeting ఎప్పుడు?” → Calendar tool
  • “ఈ order status ఏంటి?” → Database/API tool
  • “ఈ calculation correct ఆ?” → Calculator tool
  • “GitHub లో issue create చేయి” → GitHub tool

Important point:
Tool calling వల్ల model “knowledge source” కాకుండా “reasoning + orchestration layer” అవుతుంది.

5. Tokens, token IDs, vectors/embeddings — language ని numbers గా మార్చడం

LLM text ని direct గా process చేయదు. Text first tokens గా split అవుతుంది. Token word కావచ్చు, word part కావచ్చు, punctuation కూడా కావచ్చు.

Example:

  • “unbelievable” ఒక token కావచ్చు లేదా “un”, “believ”, “able” లా multiple tokens కావచ్చు
  • “Explain Java collections” multiple tokens అవుతుంది

Flow:

  1. Text → tokens
  2. Tokens → token IDs
  3. Token IDs → embeddings/vectors
  4. Vectors → Transformer layers
  5. Output tokens → final text

Embedding అంటే ఏంటి?
Embedding అంటే word/sentence meaning ని numbers list గా represent చేయడం. Similar meaning ఉన్న words vectors space లో దగ్గరగా ఉంటాయి.

Example:

  • “car” and “automobile” meanings similar, vectors close
  • “king” and “queen” relation meaningful గా capture అవుతుంది
  • “bank” meaning context బట్టి river/finance వైపు shift అవుతుంది

ఎందుకు develop చేయాల్సి వచ్చింది?
Computers numbers మీద operate చేస్తాయి. Language meaning ని mathematical form లోకి convert చేస్తే machine similarity, context, relationship analyze చేయగలదు.

Use case:
Search system లో user exact keyword use చేయకపోయినా similar meaning documents retrieve చేయగలము. ఇది RAG కి base.

6. Transformer architecture — modern LLMs కి core engine

Transformer architecture 2017 “Attention is All You Need” paper వల్ల popular అయింది. ChatGPT, Gemini, Claude లాంటి systems Transformer family మీద based.

Old problem ఏంటి?
Older sequence models long context handle చేయడం లో weak. Sentence లో earlier word later meaning ని affect చేస్తే capture చేయడం difficult.

Example:

“The trophy doesn’t fit in the suitcase because it is too small.”
ఇక్కడ “it” suitcase ని refer చేస్తుంది. Context understand చేయాలి.

Attention mechanism అంటే?
Model ప్రతి token processing సమయంలో, sentence లోని other tokens లో ఏవి important అనేది weight చేస్తుంది. దీనివల్ల context relationships capture అవుతాయి.

ఎలా high level లో work చేస్తుంది?

  1. Tokens embeddings గా convert అవుతాయి
  2. Positional information add చేస్తారు — word order తెలియాలి కాబట్టి
  3. Attention layers relevant tokens మీద focus చేస్తాయి
  4. Feed-forward layers meaning refine చేస్తాయి
  5. Multiple layers repeat అవుతాయి
  6. Final layer next token probabilities ఇస్తుంది

Use case:
Long prompt లో “answer Telugu-English mix లో ఇవ్వు” అని beginning లో చెప్పినా, later answer అంతా ఆ style follow చేయడానికి context tracking ఉపయోగపడుతుంది.

7. Token cost — AI app economics

LLM APIs tokens basis లో charge చేస్తాయి. Input tokens + output tokens cost. Long conversation, large documents, verbose outputs — ఇవన్నీ cost increase చేస్తాయి.

ఎందుకు important?
Prototype లో cost small గా కనిపిస్తుంది. But 10,000 users daily use చేస్తే cost suddenly huge అవుతుంది.

Cost పెరగడానికి reasons:

  • Long chat history repeatedly send చేయడం
  • Unnecessary full documents prompt లో పెట్టడం
  • Very large output generate చేయించడం
  • Expensive model simple tasks కి use చేయడం
  • RAG retrieval too many chunks పంపించడం

How to manage?

  • Conversation summary maintain చేయడం
  • Relevant chunks only send చేయడం
  • Small model for simple tasks, big model for complex tasks
  • Max tokens limit పెట్టడం
  • Caching use చేయడం
  • Prompt concise గా design చేయడం
  • Evaluation ద్వారా unnecessary steps remove చేయడం

Use case:
Customer support bot లో greeting, simple FAQ కి cheaper model. Complex escalation కి stronger model. ఇలా routing చేస్తే cost control అవుతుంది.

8. RAG — company/private data తో grounded answers

RAG full form Retrieval-Augmented Generation. ఇది LLM ని company knowledge తో connect చేసే practical pattern.

Problem:
Base LLM కి company internal docs తెలియవు. Also model guess చేస్తే hallucination. Company-specific answers కి trusted source కావాలి.

RAG pipeline:

  1. Documents collect చేస్తారు — PDFs, Notion pages, website docs, DB records
  2. Text clean చేస్తారు
  3. Text ని chunks గా split చేస్తారు
  4. ప్రతి chunk కి embedding generate చేస్తారు
  5. Vector DB లో embeddings + metadata store చేస్తారు
  6. User query embedding generate చేస్తారు
  7. Similar chunks retrieve చేస్తారు
  8. Retrieved context prompt లో model కి ఇస్తారు
  9. Model context ఆధారంగా answer generate చేస్తుంది

Chunking ఎందుకు important?
Full document model కి పంపితే costly and noisy. చిన్న meaningful chunks అయితే relevant information retrieve అవుతుంది.

Metadata ఎందుకు?
Document title, date, department, access permissions వంటి metadata filtering కి ఉపయోగపడుతుంది.

Use case:
Telusko chatbot: “Agentic AI course లో MCP ఎప్పుడు వస్తుంది?” అని అడిగితే, course notes/docs నుంచి MCP related chunks retrieve చేసి answer ఇవ్వాలి.

Limitation:
RAG కూడా perfect కాదు. Bad chunking, old documents, wrong retrieval, missing permissions ఉంటే answer quality పడిపోతుంది.

9. Vector DB — meaning-based search engine

Vector DB embeddings store చేసి similarity search చేస్తుంది. Traditional DB exact match కి strong; Vector DB semantic match కి strong.

ఎందుకు కావాలి?
User language and document language same ఉండకపోవచ్చు.

Example:

  • Document: “refund eligibility”
  • User: “money back rules”
  • Keyword search miss అవ్వచ్చు
  • Vector search meaning match చేయగలదు

Vector DB లో usually ఏమి store చేస్తారు?

  • embedding vector
  • original text chunk
  • source document URL/id
  • metadata
  • permissions info
  • timestamps/version info

Search ఎలా జరుగుతుంది?

  1. User query embedding అవుతుంది
  2. Vector DB nearest vectors find చేస్తుంది
  3. Top K chunks return చేస్తుంది
  4. Model వాటిని context గా use చేస్తుంది

Use cases:

  • Internal knowledge assistant
  • Product documentation search
  • Legal document Q&A
  • Course recommendation bot
  • Support ticket similarity search

10. MCP — tools integration కి common standard

MCP అంటే Model Context Protocol. ఇది agents/tools మధ్య communication కి standard interface ఇవ్వడానికి useful.

Problem before MCP:
ప్రతి tool integration custom. GitHub కి ఒక style, Slack కి ఒక style, database కి ఇంకొక style. Agent developers కి integration maintenance burden.

MCP idea:
Tools ని standardized way లో expose చేయాలి. Agent tools list తెలుసుకుని, required tool call చేయాలి.

ఎలా use చేస్తారు?

  1. MCP server tools provide చేస్తుంది
  2. Agent available tools discover చేస్తుంది
  3. User intent బట్టి right tool select చేస్తుంది
  4. Tool input structured గా పంపుతుంది
  5. Tool output తీసుకుని reasoning continue చేస్తుంది

Use cases:

  • GitHub repo read/write
  • Slack messages search/post
  • Database records query/update
  • File system read/write
  • CRM data fetch
  • Calendar scheduling

Important caution:
Tool calling actions dangerous కావచ్చు. Delete, send email, update database వంటి actions కి permissions, confirmations, audit logs అవసరం.

11. Prompt engineering — model behavior ని shape చేయడం

Prompt engineering అంటే model కి task, role, constraints, context, output format clearly చెప్పడం.

Bad prompt:
“Explain RAG.”

Better prompt:
“You are teaching a beginner. Explain RAG in Telugu-English mix, include why it was developed, how it works, one real company chatbot use case, and limitations. Use bullets.”

ఎందుకు important?
LLM flexible. Good prompts లేకపోతే output inconsistent. Application లో consistency కావాలి.

Good prompt components:

  • Role: “You are a senior AI engineer”
  • Audience: “Beginner software developers”
  • Context: “Based on these course notes”
  • Task: “Explain concepts”
  • Constraints: “Don’t invent facts”
  • Format: “Use headings and bullets”
  • Examples: one-shot/few-shot
  • Tone: “Colloquial Telugu-English mix”

Prompt techniques:

  • Zero-shot: example లేకుండా direct task
  • One-shot: ఒక example తో
  • Few-shot: multiple examples తో
  • Structured prompting: fixed JSON/table/bullets format
  • Constraint prompting: do/don’t rules
  • Contextual prompting: extra background ఇవ్వడం

Use case:
YouTube script generator లో title generation, title selection, script generation, script evaluation — ప్రతి step కి different prompt and role ఇవ్వడం వల్ల pipeline controlled అవుతుంది.

12. Agents — chatbot కంటే next level

Agent అంటే LLM + reasoning + memory/context + tools + goal-oriented workflow.

Chatbot vs Agent:

  • Chatbot mostly answer ఇస్తుంది
  • Agent task plan చేసి tools use చేసి action complete చేస్తుంది

Agent high-level loop:

  1. User goal understand చేస్తుంది
  2. Task ని steps గా break చేస్తుంది
  3. అవసరమైన data/tools identify చేస్తుంది
  4. Tool calls చేస్తుంది
  5. Results evaluate చేస్తుంది
  6. అవసరమైతే next step decide చేస్తుంది
  7. Final answer/action complete చేస్తుంది

Use case:
“నా meeting transcript నుంచి action items తీసుకుని task tracker లో create చేయి.”
Agent transcript read చేస్తుంది, action items extract చేస్తుంది, assignee/due date infer లేదా ask చేస్తుంది, task database లో rows create చేస్తుంది.

Important caution:
Agents autonomous కాబట్టి guardrails must: permissions, confirmations, rate limits, logging, rollback, user approval.

Programme Tools List

This is a reference list of tools and libraries. Some of these may not be used or referred to during the course.

 

Category Tool / Library Mapped Module(s) Alternatives Web Link
Frameworks & Orchestration LangChain 6, 7, 9–17, 19–21 langchain.comLinks to an external site.
Autogen & Autogen Studio 2, 8, 9, 10, 11, 12, 17, 20 microsoft.github.io/autogenLinks to an external site.
Flowise 1, 8, 9, 15, 19, 20, 21 flowiseai.comLinks to an external site.
CrewAI 9, 10, 11, 19, 21 Guardrails AI, LangGraph crewai.comLinks to an external site.
LangFlow 4, 9, 20 langflow.orgLinks to an external site.
OpenAgents 9, 19, 20 github.com/xlang-ai/OpenAgentsLinks to an external site.
AgentVerse 10, 14 Autogen, CrewAI github.com/OpenBMB/AgentVerseLinks to an external site.
N8N 9 n8n.ioLinks to an external site.
Guardrails AI 18 guardrailsai.comLinks to an external site.
AI Models & APIs OpenAI (All services) 1, 2, 5, 6, 7, 9, 12, 13, 14, 18, 21 Hugging Face Transformers, Cohere API openai.comLinks to an external site.
Hugging Face 5, 6, 15, 16, 21 huggingface.coLinks to an external site.
Google SDK / ADK 7, 9 ai.google.devLinks to an external site.
Claude 12 claude.aiLinks to an external site.
Groq 7 groq.comLinks to an external site.
Vector Databases ChromaDB 6, 12, 15, 17, 21 FAISS trychroma.comLinks to an external site.
Pinecone 12, 15, 18, 21 ChromaDB, FAISS pinecone.ioLinks to an external site.
FAISS 6, 12, 20 faiss.aiLinks to an external site.
Development & Deployment Python 1, 3, 2007 python.orgLinks to an external site.
Jupyter 1, 3 jupyter.orgLinks to an external site.
Replit 2, 16 GitHub Pages, Local dev replit.comLinks to an external site.
Pydantic 7, 9 pydantic.devLinks to an external site.
Streamlit 16, 19, 21 Gradio streamlit.ioLinks to an external site.
FastAPI 16 Flask fastapi.tiangolo.comLinks to an external site.
Render 16 GitHub Pages, Streamlit Cloud render.comLinks to an external site.
Gradio 17 Streamlit gradio.appLinks to an external site.
Monitoring & Debugging LangSmith 1, 16, 17 LangFuse, Custom logging langchain.com/langsmithLinks to an external site.
PromptLayer 2, 13, 17 LangSmith, LangFuse, Manual tracing promptlayer.comLinks to an external site.
AgentOps 16, 17 LangSmith, Manual instrumentation agentops.aiLinks to an external site.
LangFuse 1 LangSmith langfuse.comLinks to an external site.
Machine Learning & Visualization Google Teachable Machine 3, 4 teachablemachine.withgoogle.comLinks to an external site.
Scikit-learn 4, 7 scikit-learn.orgLinks to an external site.
TensorFlow Playground 4, 8 playground.tensorflow.orgLinks to an external site.
Python Tutor 2 pythontutor.comLinks to an external site.
Tokenizer Visualizers 5, 10 tiktokenizer.vercel.appLinks to an external site.
CleanRL 14 Stable Baselines3, PettingZoo github.com/vwxyzjn/cleanrlLinks to an external site.
t-SNE tools 6 sklearn.manifold.TSNELinks to an external site.
Ethics & Resources AI Fairness Checklist 18 Google AI – Advancing AI safely and responsiblyLinks to an external site.
Ethics Cards Toolkit 18 Ethics CardsLinks to an external site.

Tools and practices

18 Responsible AI Tools and Practices | Microsoft AI