Building your own chatbot

I am an AI engineer and I would like to share how to quickly build your own chatbot.

  1. Start with your custom data, which you believe to be true, and an embedding model for the encoder.
  2. Chunk and generate embeddings of your data using the encoder. Save the data and metadata in a vector database.
  3. The user asks a question. Generate embeddings of the question using the same encoder from step 1.
  4. Retrieve answers to your question by performing a semantic search using the vector database.
  5. Stuff the answer chunks of text from your custom documents into a “Context.” Stuff the question and context into a prompt. Send the prompt to a generating LLM.
  6. Get back a reliable answer from the generating LLM.
    The specific code can be found at the ziliiz blog :building-open-source-chatbot-using-milvus-and-langchain-in-5-minutes
1 Like