ZIm/crates/collab/src
Kyle Kelley 49371b44cb
Semantic Index (#10329)
This introduces semantic indexing in Zed based on chunking text from
files in the developer's workspace and creating vector embeddings using
an embedding model. As part of this, we've created an embeddings
provider trait that allows us to work with OpenAI, a local Ollama model,
or a Zed hosted embedding.

The semantic index is built by breaking down text for known
(programming) languages into manageable chunks that are smaller than the
max token size. Each chunk is then fed to a language model to create a
high dimensional vector which is then normalized to a unit vector to
allow fast comparison with other vectors with a simple dot product.
Alongside the vector, we store the path of the file and the range within
the document where the vector was sourced from.

Zed will soon grok contextual similarity across different text snippets,
allowing for natural language search beyond keyword matching. This is
being put together both for human-based search as well as providing
results to Large Language Models to allow them to refine how they help
developers.

Remaining todo:

* [x] Change `provider` to `model` within the zed hosted embeddings
database (as its currently a combo of the provider and the model in one
name)


Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
2024-04-12 11:40:59 -06:00
..
api Respect version constraints when installing extensions (#10052) 2024-04-01 17:10:30 -04:00
bin Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
db Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
rpc Revert "Revert "language: Remove buffer fingerprinting (#9007)"" (#9671) 2024-04-12 18:40:35 +02:00
tests Revert "Revert "language: Remove buffer fingerprinting (#9007)"" (#9671) 2024-04-12 18:40:35 +02:00
ai.rs Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
api.rs Allow setting a channel for new users to auto-join (#9291) 2024-03-13 11:11:31 -06:00
auth.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00
db.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00
env.rs Add an extensions API to the collaboration server (#7807) 2024-02-15 12:53:57 -08:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
executor.rs Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
lib.rs Enable Claude 3 models to be used via the Zed server if "language-models" feature flag is enabled for user (#10015) 2024-03-31 15:57:57 -06:00
main.rs Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
rate_limiter.rs Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
rpc.rs Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
seed.rs Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
tests.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00