#How use Embedding?

25 messages · Page 1 of 1 (latest)

coarse grove
#

Hello, in the official openIA documentation it explains how to create embeddings but it doesn't explain how to use them, that is, how to consume an embedding
How to use embedding? (preferably with javascript code but if it's python it's fine)

tulip ocean
coarse grove
# tulip ocean 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.

tulip ocean
#

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

OpenAI

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

GitHub

Examples and guides for using the OpenAI API. Contribute to openai/openai-cookbook development by creating an account on GitHub.

coarse grove
#

sorry my english is basic

tulip ocean
#

You can embed pieces of the book, and then search through the embeddings for the most relevant pieces based on the user's question

coarse grove
tulip ocean
loud kite
#

@tulip ocean any js resources?

hollow ibex
#

@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

tulip ocean
hollow ibex
#

How can we achieve that? @tulip ocean

tulip ocean
#

Programatically, you can save the user prompt and the GPT response every time to build a linear conversation history

hollow ibex
#

Wao! This is going beyond me, can I introduce you to my team so we pick it up from there?

loud kite
tulip ocean
kindred mantle
#

@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

lone glen
#

@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...

▶ Play video