Questions about embeddings

I am looking for a solution that can can data that I feed to the bot, and return an answer using the AI with its own natural language to answer a question… ← is this possible?

What about imbedding’s? Some of the YouTube videos that I have seen about embeddings show a final answer NOT as a natural language, but more like a structured json document… similar to function calls, it seems to return an answer as an structured json document, and if you want some sort of natural language, then I must add some text to the response…

I suppose OpenAI has the ability to do what I am looking for… but which tool should I use?

Below is a reference video of what I want to do with OpenAi, but the video below is for a Langchain tuturial… check it about a min and you’ll see what I am looking… basically… just a bout to answer naturally from given questions:

^^^ Now I got this working in plain Node.js… but NOT in Next.js…

ALSO… the above video can’t incorporate “memory”… if I tell my name to the bot, and on the next question I ask my name, then the bot says it doesn’t have the information of my name… <— this would be a nice feature to have, but for now I am more interested in just a bot that can understand given questions and return an answer instead of just a json file…

^^^ Is this possible using OpenAI? Am I asking too much from this technology?

Embeddings, vector databases, retrieval augmented generation (RAG), are all part of the stack! Just search the forum here for more information.

OpenAI also has their own embedding engine called text-embedding-ada-002.

Even though LangChain is a great open source library for LLM’s, it can obscure the basics for those wanting to dig deeper.

But in simple terms, you use embeddings to create a search engine on your data, and you bring the LLM this related data to draw its answer from. It could be from anything, from the far past in a conversation, or something specific about a product you sell … whatever.