> For the complete documentation index, see [llms.txt](https://agenticai.kasinathanramesh.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agenticai.kasinathanramesh.vip/section-2-basics-of-langchain-and-langgraph/use-case-simple-ai-chatbot.md).

# Use Case - Simple AI Chatbot

Client Requirement - Create AI Chatbot and that will answer the user query based on the attached document. In case answer is not available in the document go and search in the internet and provide the answer and this is required to use an AI Agent.

Problem Statement

To Achieve the problem statement

1. <mark style="color:$primary;background-color:$primary;">**Common Requirement Gathering**</mark>
   1. LLM Model - Content summarization
   2. Prompt - Use Prompt
   3. RAG - To retrieve the answers from the document
   4. Search Tool - To search the answers from internet for the user queries
   5. Memory Component - To store the Queries and Responses
   6. AI Agent Framework - Application should be AI Agent application
2. <mark style="color:$primary;background-color:$primary;">**LangChain Components and tools - 7 Key Components**</mark>
   1. LLM Model
   2. Prompt Template
   3. Chain - Required to integrate so many Tasks
   4. RAG - Use to refer the document
   5. Memory - Based on the requirement like AI agent requirement
   6. Tool - Based on requirement - like web search
3. Mapping Our Requirement with LangChain

{% columns %}
{% column %} <mark style="color:$primary;background-color:$primary;">**Client Requirement - Mapping with**</mark>

1. Dynamic Query
2. Prompt
3. RAG - in Chain
4. Web search
5. Memory
6. AI Agent
   {% endcolumn %}

{% column %} <mark style="color:$primary;background-color:$primary;">**LangChain Components**</mark>

1. LLM Model
2. Prompt Template
3. RAG Component
4. Tool
5. Memory Component
6. AI Agent
   {% endcolumn %}
   {% endcolumns %}

Setup Environment Variables

Need API Keys for OpenAI,Gemini and Anhropic


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agenticai.kasinathanramesh.vip/section-2-basics-of-langchain-and-langgraph/use-case-simple-ai-chatbot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
