buildfastwithaibuildfastwithai
AI WorkshopsAll blogsPartner with usFDE Program
Unrot mascotGet yourselfupskilled in AIfor free.Get the appNext live workshopFree AI WorkshopLive session, recording includedReserve a seat

Newsletter

Stay ahead

AI tools and tips. No spam.

Share
Back to blogs
Tools
Tutorials

Embedchain: Building AI-Powered Chatbots

By Satvik Paramkusham
February 3, 2025
4 min read
Share:
 Embedchain: Building AI-Powered Chatbots
Share:

Will you let others shape the future for you, or will you lead the way?

Gen AI Launch Pad 2025 is your moment to shine.

Introduction

The rise of AI-powered chatbots has transformed the way businesses interact with users, making information retrieval faster and more efficient. One powerful open-source framework for building intelligent, document-based chatbots is Embedchain. This framework allows developers to integrate various data sources, such as websites, PDFs, and text documents, with advanced language models to create interactive AI assistants.

In this blog post, we will explore Embedchain in depth, walking through installation, configuration, data integration, and querying. By the end, you will have a solid understanding of how to build your own AI chatbot using Embedchain.

1. Setting Up Embedchain

Before building our chatbot, we need to install Embedchain and its dependencies.

Installation

Embedchain requires ChromaDB, a vector database for efficient data retrieval. Install both using pip:

!pip install embedchain chromadb

This installs the core libraries required to store and query data effectively.

Configuring API Keys

To use language models like OpenAI's GPT or Cohere, we need to configure API keys:

from google.colab import userdata
import os

openai_api_key = userdata.get('OPENAI_API_KEY')
os.environ["OPENAI_API_KEY"] = openai_api_key
os.environ["COHERE_API_KEY"] = userdata.get('COHERE_API_KEY')

This ensures the chatbot can generate responses using LLMs.

2. Creating an Embedchain Application

Once the dependencies are set up, we can create an Embedchain app with a vector database (ChromaDB in this case).

from embedchain import App

app = App.from_config(config={
    "vectordb": {
        "provider": "chroma",
        "config": {
            "collection_name": "my-collection",
            "allow_reset": True
        }
    }
})

Explanation:

  • App.from_config() initializes an Embedchain application.
  • ChromaDB is configured as the vector database.
  • The collection stores indexed documents for retrieval.

This setup enables us to store and retrieve knowledge from documents and web sources.

3. Adding Data Sources

Adding a Website

Embedchain allows us to ingest data from a website for chatbot interaction.

app.add("https://www.forbes.com/profile/elon-musk")

Expected Output:

Inserting batches in chromadb: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:01<00:00, 1.69s/it]
'8cf46026cabf9b05394a2658bd1fe890'

Adding a PDF File

We can also integrate PDF documents into our chatbot:

app.add("https://navalmanack.s3.amazonaws.com/Eric-Jorgenson_The-Almanack-of-Naval-Ravikant_Final.pdf")

4. Querying the Chatbot

After adding data, we can interact with the chatbot by asking questions:

while True:
    question = input("Enter question: ")
    if question in ['q', 'exit', 'quit']:
        break
    answer = app.query(question)
    print(answer)

Example Interaction:

Input:

Enter question: Who is Elon Musk?

Output:

Elon Musk is a prominent entrepreneur and business magnate known for cofounding several influential companies, including Tesla, SpaceX, and xAI.
LLM AGENTSRAG PIPELINESTOOL CALLINGDEPLOYMENT
Let's build

Start building AI agents with Build Fast

Explore ProgramJoin Waitlist

5. Displaying Responses as Markdown

To enhance output readability in Jupyter notebooks, we can format responses as Markdown:

from IPython.display import Markdown

markdown_answer = Markdown(answer)
display(markdown_answer)

This allows the chatbot’s responses to be presented in a structured format.

6. Configuring Cohere with Embedchain

Instead of OpenAI, we can use Cohere as the language model provider:

app = App.from_config(config={
    "llm": {
        "provider": "cohere",
        "config": {
            "model": "gptd-instruct-tft",
            "temperature": 0.5,
            "max_tokens": 1000,
            "top_p": 1,
            "stream": False
        }
    },
    "vectordb": {
        "provider": "chroma",
        "config": {
            "collection_name": "my_cohere_app_collection",
            "allow_reset": True
        }
    }
})

Why Use Cohere?

  • Offers different model capabilities compared to OpenAI.
  • Customizable configurations for fine-tuning chatbot behavior.

Conclusion

We have explored how Embedchain simplifies the creation of AI-powered, document-based chatbots. From installing dependencies and adding data sources to querying and displaying results, this framework enables rapid chatbot development with minimal effort.

Key Takeaways:

  • Embedchain integrates various data sources (websites, PDFs, etc.) into an AI chatbot.
  • ChromaDB is used for efficient knowledge storage and retrieval.
  • Users can query the chatbot in real-time to get answers from indexed documents.
  • Support for OpenAI and Cohere allows flexibility in choosing language models.

Resources

  • Embedchain GitHub Repository
  • ChromaDB Documentation
  • OpenAI API
  • Cohere API
  • Embedchain Experiment Build Fast with AI Notebook

---------------------------

Stay Updated:- Follow Build Fast with AI pages for all the latest AI updates and resources.

Experts predict 2025 will be the defining year for Gen AI Implementation. Want to be ahead of the curve?

Join Build Fast with AI’s Gen AI Launch Pad 2025 - your accelerated path to mastering AI tools and building revolutionary applications.

---------------------------

Cohort program

Claude MasteryCowork & Code

Explore programJoin waitlistNo coding needed

Resources and Community

Join our community of 12,000+ AI enthusiasts and learn to build powerful AI applications! Whether you're a beginner or an experienced developer, this tutorial will help you understand and implement AI agents in your projects.

  • Website: www.buildfastwithai.com
  • LinkedIn: linkedin.com/company/build-fast-with-ai/
  • Instagram: instagram.com/buildfastwithai/
  • Twitter: x.com/satvikps
  • Telegram: t.me/BuildFastWithAI


Satvik Paramkusham
Written by

Satvik Paramkusham

Founder at Build Fast with AI. AI Engineer, educator, and researcher passionate about agentic AI workflows, LLM application architecture, and training the next generation of AI builders.

Share:

Partner with Build Fast with AI

Guest posts, sponsored articles, tool reviews and in-blog CTAs. See what we offer and get in touch.

Partner with us

Topics

  • Claude AI
  • Best AI Models
  • AI Coding Tools
  • AI Agent Frameworks
  • Agentic AI
  • Open-Source LLMs
  • RAG & Vector Databases
  • AI Industry News

Popular guides

  • 100 Best AI Photo Editing Prompts
  • 75 Best ChatGPT Images 2.5 Prompts
  • 100 Best AI Video Prompts
  • Best AI Models 2026, Tested
  • Claude AI Complete Guide
  • What Is MCP?

Build Fast with AI

  • Build Fast with AI
  • AI Workshops
  • Corporate Training
  • FDE Program
  • Partner with Us
  • Contact
Β© 2026 Intellify Edventures Private Limited. All rights reserved.
    You Might Also Like
    ChatGPT Images 2.6: Features, Pricing and Review
    Tutorials
    ChatGPT Images 2.6: Features, Pricing and Review

    ChatGPT Images 2.6 review covering Flare vs Sunburst, GIFs, SVG output, image editing, API pricing and practical prompts for creators.

    50 Best Diwali AI Photo Prompts 2026 for Gemini, ChatGPT & Nano Banana
    Tools
    50 Best Diwali AI Photo Prompts 2026 for Gemini, ChatGPT & Nano Banana

    Create stunning Diwali photos with 50 copy-paste AI prompts for Gemini, ChatGPT and Nano Banana. Try realistic portraits, couple photos, saree looks, diyas, rangoli and festive posters.