Skip to content
Amresh Verma edited this page May 28, 2026 · 52 revisions
  • Prompt Engineering
  • RAG (Retrieval Augmented Generation)
  • Embeddings + Vector
  • DB Function Calling / Tools
🧠

1. Prompt Engineering

🧠 1. Prompt Engineering

📌 What is it?

Writing smart input (prompt) to get correct output from LLM

🎯 Example

❌ Bad Prompt: Tell me about milk

✅ Good Prompt: You are a shop assistant.

Extract product name and quantity: Input: "2 milk and 1 bread"

Output JSON:

👉 Output becomes structured:

{ "milk": 2, "bread": 1 }

🧠

2. RAG (Retrieval Augmented Generation)

Overview

Retrieval-Augmented Generation (RAG) is an AI architecture that enhances large language models (LLMs) by allowing them to retrieve relevant external information before generating a response.

Instead of relying only on pre-trained knowledge, RAG enables models to access up-to-date, domain-specific, and private data sources, making responses more accurate and context-aware.

RAG is widely used in:

  • Customer support chatbots
  • Healthcare report summarization
  • Legal and compliance systems
  • Financial analysis tools
  • Enterprise knowledge search systems

Why RAG is Important

Traditional LLMs like GPT-style models generate responses based only on training data. This creates limitations:

Limitations of standard LLMs

  • Knowledge cutoff (no real-time updates)
  • Hallucinations (false or made-up answers)
  • No access to private company data
  • Lack of personalization/context

RAG solves these problems by:

  • Fetching real-time relevant data
  • Grounding answers in actual documents
  • Reducing hallucinations
  • Keeping knowledge updated without retraining

Clone this wiki locally