32 ms·
How does the semantic search plugin work? Does it create an embedding for the model using the uploaded documents, or does it perform full-text search on the doc
by lxe 4y ago
How does the semantic search plugin work? Does it create an embedding for the model using the uploaded documents, or does it perform full-text search on the docs and then uses the model to answer based on the retrieved section of the document? What exactly is the datastore API here?
- lxe 4y agoFound the answer here: https://github.com/openai/chatgpt-retrieval-plugin#retrieval-plugin https://github.com/openai/chatgpt-retrieval-plugin#retrieval... The plugin uses OpenAI's text-embedding-ada-002 embeddings model to generate embeddings of document chunks, and then stores and queries them using a vector database on the backend. As an open-source and self-hosted solution, developers can deploy their own Retrieval Plugin and register it with ChatGPT. The Retrieval Plugin supports several vector database providers, allowing developers to choose their preferred one from a list.
- saqadri 4y agoAuthor here. This section of the readme has more information: https://github.com/lastmile-ai/llama-retrieval-plugin#retrieval-plugin https://github.com/lastmile-ai/llama-retrieval-plugin#retrie... It does use a vector database (pinecone, weaviate, etc.) to store embeddings. The embeddings are created using OpenAI's text-embedding-ada-002 model, but that's not a requirement. In fact we are looking at embeddings generation through BERT or RoBERTa to benchmark performance. At prompt time, the plugin retrieves the nearest embeddings to the prompt, and inserts them into a more complete prompt before sending it to the model.
- lxe 4y agoThank you! I'm looking into sentence-transformers also to create embeddings from documents.