4 ms·
It's pretty straightforward to build something like this. Pseudo: embedding = OpenAI.generate_embedding(some_question) embedding_matches = pinecone.q
by sergiotapia 4y ago
It's pretty straightforward to build something like this.
Pseudo:
embedding = OpenAI.generate_embedding(some_question)
embedding_matches = pinecone.query(embedding)
context_strings = embedding_matches.context_strings
OpenAI.chat(some_question + context_strings)
You give OpenAI's chat API something like:
"""
This is my user question, how old is James bond?
using this context answer this question:
{{from doc: james bon is 19 years old}}
"""
Really powerful, really useful - but really simple to create.