SmartBot is a lightweight AI chatbot that gives structured, helpful responses to user questions. Itβs designed as a beginner-friendly project to demonstrate all five key Generative AI concepts: system prompts, user prompts, tuning, structured output, function calling, and RAG.
-
User types a question
Example: βWhat is AI?β or βWhatβs the weather in Jaipur?β -
System + User Prompts
- System prompt defines the assistantβs role (e.g., βYou are a helpful, friendly chatbot.β)
- User prompt is the actual question typed by the user.
-
Tuning Parameters
- Users can choose response style:
- Precise (temperature = 0.3)
- Creative (temperature = 0.9)
- Users can choose response style:
-
Structured Output
- Responses are formatted as:
- Bullet points
- Tables
- JSON (if needed)
- Responses are formatted as:
-
Function Calling
- SmartBot detects when to call simple functions like:
calculate(expression)
getWeather(city)
getTime(location)
- SmartBot detects when to call simple functions like:
-
RAG (Retrieval-Augmented Generation)
- For knowledge-based questions, SmartBot searches a small built-in knowledge base to generate factual answers.
Uses both system and user prompts to control behavior and tone.
User can choose between clear/direct or creative/informal response styles.
Returns clean and organized information β easy to understand or parse.
Calls backend functions for live data (like weather, time, math).
Fetches relevant data from internal knowledge base before generating answers.
Metric | How Itβs Achieved |
---|---|
Correctness | Uses basic RAG and function validation |
Clarity | Structured formats like lists and tables |
Speed | Lightweight with fast API responses |
Simplicity | Easy for any user to interact and learn GenAI |
Part | Tool |
---|---|
Frontend | HTML + CSS + JavaScript (or React) |
Backend | Node.js or Python (Flask) |
AI API | OpenAI GPT / Gemini / Cohere |
Optional DB | Small in-memory store (for RAG) |