Skip to content

kalviumcommunity/SmartBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– SmartBot – Simple GenAI Chat Assistant

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.


πŸ”§ How It Works

  1. User types a question
    Example: β€œWhat is AI?” or β€œWhat’s the weather in Jaipur?”

  2. 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.
  3. Tuning Parameters

    • Users can choose response style:
      • Precise (temperature = 0.3)
      • Creative (temperature = 0.9)
  4. Structured Output

    • Responses are formatted as:
      • Bullet points
      • Tables
      • JSON (if needed)
  5. Function Calling

    • SmartBot detects when to call simple functions like:
      • calculate(expression)
      • getWeather(city)
      • getTime(location)
  6. RAG (Retrieval-Augmented Generation)

    • For knowledge-based questions, SmartBot searches a small built-in knowledge base to generate factual answers.

✨ Key Features

🧠 Prompting

Uses both system and user prompts to control behavior and tone.

πŸŽ› Tuning

User can choose between clear/direct or creative/informal response styles.

πŸ“„ Structured Output

Returns clean and organized information – easy to understand or parse.

πŸ”§ Function Calling

Calls backend functions for live data (like weather, time, math).

πŸ“š RAG

Fetches relevant data from internal knowledge base before generating answers.


βœ… Evaluation

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

πŸ› οΈ Tech Stack

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)

About

This is your first repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published