News for hackers. Stuff that matters.
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by HarHarVeryFunny on Thursday May 11, 2023 @06:53PM (#35909436)
Do the OpenAI APIs support converting prompts to vectors, or are people running their own models locally to do this? Can you recommend any good resources to read up on vector DB approaches to working around context length limits ?
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by make3 on Thursday May 11, 2023 @07:48PM (#35909946)
open ai has an embeddings api that ppl use for that https://platform.openai.com/docs/guides/embeddings, though whether it's the best model to do that is congested.

Contriever is an example of a strong model to do that yourself. see their paper too to learn about the domain. https://github.com/facebookresearch/contriever

Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by HarHarVeryFunny on Thursday May 11, 2023 @09:50PM (#35910906)
Thanks!
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by ukuina on Friday May 12, 2023 @01:59AM (#35912488)
Yes, you can use a local embeddings model like gtr-t5-xl alongside retriever augmentation. This can point you in the right direction: https://haystack.deepset.ai/tutorials/22_pipeline_with_promp...
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by HarHarVeryFunny on Friday May 12, 2023 @02:49PM (#35920508)
Thanks!
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by tuanacelik on Friday May 12, 2023 @03:59AM (#35913305)
Indeed this tutorial on Haystack is a good one as an example: https://haystack.deepset.ai/tutorials/22_pipeline_with_promp... It combines a retrieval step followed by a prompt layer which inserts the relevant context into the prompt. You can however change the 'retrieval step' with something that uses a proper embedding model and OpenAI also provides those if you want to. I tend to use lighter (cheaper) OSS models for this step though. PS: There's some functionality in the PromptNode to make sure you don't exceed prompt limit.
Re:Anthropic - Introducing 100K Token Context Windows, Aroun... by HarHarVeryFunny on Friday May 12, 2023 @02:48PM (#35920500)
That's great - thanks!