#How use Embedding?
25 messages · Page 1 of 1 (latest)
How do you want to consume the embedding? What is your use case?
I'm still not sure because since I have no idea how to use it, I don't know what it can be useful for, but I would like to try using the option to complete text by putting an AI. Sometimes I want to use the same prompt template over and over again without having to tokenize the same thing over and over again, example of prompt template:
[text to insert] summarizes the inserted text.
This template is very short but it serves what I want to explain, the text "summarizes the inserted text" is something that in my code I consult over and over again and every time I call the openIA API it must tokenize it which I think is unnecessary .
Anyway I'm not sure if it can be used for this purpose, so if you can explain me how to use an Embedding to find the utility it would help me.
Let me find some helpful links for you
one sec
Embeddings are for generating vectorized representations of text, used for finding similar pieces of text and etc, I don't think embeddings are what you want in your use case, but here's some more details
https://openai.com/blog/introducing-text-and-code-embeddings/
https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb
We are introducing embeddings, a new endpoint in the OpenAI API that makes it easy to perform natural language and code tasks like semantic search, clustering, topic modeling, and classification. Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships
What I'm specifically interested in is using the API to remember a context, for example I would like to input all the information about a book and make questions about that book, so that the AI can respond with specific details about that book.
sorry my english is basic
This is exactly that, remembering context and answering questions based on that context 🙂
You can embed pieces of the book, and then search through the embeddings for the most relevant pieces based on the user's question
Thank you very much, your answer has been very helpful seriously, it was difficult for me to find information, would you allow me to ask you more if I have any questions? (don't worry you can say no)
Yeah! Feel free to ask as many questions as you want here, I'll try to answer whenever possible
@tulip ocean any js resources?
@tulip ocean
What if we wanted to use the "chat" preset of the text davinci 003 model as an API on our platform
We have the API running presently and we can interact with it, but she sounds way off compared to how she sounds on the openai playground
You have to continously concatenate the conversation history when sending it to the API, so that it knows what the "context" is for the chat
How can we achieve that? @tulip ocean
Programatically, you can save the user prompt and the GPT response every time to build a linear conversation history
Wao! This is going beyond me, can I introduce you to my team so we pick it up from there?
@tulip ocean bro any help here.
Hey I don’t personally use JS so I’m not too sure of good JS resources 😦
@loud kite Although you can use JS, it'd be much easier to use Python
I converted the embedding dataset example from Python to Java, and it wasn't too fun
Got it.
@tulip ocean do you happen to know what's the difference between vector search and index search from this youtube video? - https://www.youtube.com/watch?v=y2z7KNcysFo&lc=UgzUTRDbCCENDLHVpSd4AaABAg
"In this video, we explore the capabilities of GPT in retrieving books mentioned in a podcast episode. Using Lex Fridman's podcast as an example, we demonstrate how GPT can extract book recommendations from audio. Say goodbye to manual searches and hello to the future of book discovery. Watch now to see how GPT can revolutionize the way you find...