base on Neum AI is a best-in-class framework to manage the creation and synchronization of vector embeddings at large scale. <h1 align="center">Neum AI</h1>
<div align="center">
[Homepage](https://www.neum.ai) | [Documentation](https://docs.neum.ai) | [Blog](https://neum.ai/blog) | [Discord](https://discord.gg/mJeNZYRz4m) | [Twitter](https://twitter.com/neum_ai)
<a href="https://www.ycombinator.com/companies/neum-ai"><img src="https://badgen.net/badge/Y%20Combinator/S23/orange"/></a>
<a href="https://pypi.org/project/neumai/">
<img src="https://img.shields.io/pypi/v/neumai" alt="PyPI">
</a>
</div>
![Neum AI Hero](https://uploads-ssl.webflow.com/6552c062a6c96c60086c77df/6557cfde1ff0648321e5d3ba_Group%2066.png)
**[Neum AI](https://neum.ai) is a data platform that helps developers leverage their data to contextualize Large Language Models through Retrieval Augmented Generation (RAG)** This includes
extracting data from existing data sources like document storage and NoSQL, processing the contents into vector embeddings and ingesting the vector embeddings into vector databases for similarity search.
It provides you a comprehensive solution for RAG that can scale with your application and reduce the time spent integrating services like data connectors, embedding models and vector databases.
## Features
- 🏭 **High throughput distributed architecture** to handle billions of data points. Allows high degrees of parallelization to optimize embedding generation and ingestion.
- 🧱 **Built-in data connectors** to common data sources, embedding services and vector stores.
- 🔄 **Real-time synchronization** of data sources to ensure your data is always up-to-date.
- ♻ **Customizable data pre-processing** in the form of loading, chunking and selecting.
- 🤝 **Cohesive data management** to support hybrid retrieval with metadata. Neum AI automatically augments and tracks metadata to provide rich retrieval experience.
## Talk to us
You can reach our team either through email ([
[email protected]](mailto:
[email protected])), on [discord](https://discord.gg/mJeNZYRz4m) or by [scheduling a call wit us](https://calendly.com/neum-ai/neum-ai-demo?month=2023-12).
## Getting Started
### Neum AI Cloud
Sign up today at [dashboard.neum.ai](https://dashboard.neum.ai). See our [quickstart](https://docs.neum.ai/get-started/quickstart) to get started.
The Neum AI Cloud supports a large-scale, distributed architecture to run millions of documents through vector embedding. For the full set of features see: [Cloud vs Local](https://neumai.mintlify.app/get-started/cloud-vs-local)
### Local Development
Install the [`neumai`](https://pypi.org/project/neumai/) package:
```bash
pip install neumai
```
To create your first data pipelines visit our [quickstart](https://docs.neum.ai/get-started/quickstart).
At a high level, a pipeline consists of one or multiple sources to pull data from, one embed connector to vectorize the content, and one sink connector to store said vectors.
With this snippet of code we will craft all of these and run a pipeline:
<details open><summary>
### Creating and running a pipeline
</summary>
```python
from neumai.DataConnectors.WebsiteConnector import WebsiteConnector
from neumai.Shared.Selector import Selector
from neumai.Loaders.HTMLLoader import HTMLLoader
from neumai.Chunkers.RecursiveChunker import RecursiveChunker
from neumai.Sources.SourceConnector import SourceConnector
from neumai.EmbedConnectors import OpenAIEmbed
from neumai.SinkConnectors import WeaviateSink
from neumai.Pipelines import Pipeline
website_connector = WebsiteConnector(
url = "https://www.neum.ai/post/retrieval-augmented-generation-at-scale",
selector = Selector(
to_metadata=['url']
)
)
source = SourceConnector(
data_connector = website_connector,
loader = HTMLLoader(),
chunker = RecursiveChunker()
)
openai_embed = OpenAIEmbed(
api_key = "<OPEN AI KEY>",
)
weaviate_sink = WeaviateSink(
url = "your-weaviate-url",
api_key = "your-api-key",
class_name = "your-class-name",
)
pipeline = Pipeline(
sources=[source],
embed=openai_embed,
sink=weaviate_sink
)
pipeline.run()
results = pipeline.search(
query="What are the challenges with scaling RAG?",
number_of_results=3
)
for result in results:
print(result.metadata)
```
</details>
<details><summary>
### Creating and running a pipeline - Postgres connector
</summary>
```python
from neumai.DataConnectors.PostgresConnector import PostgresConnector
from neumai.Shared.Selector import Selector
from neumai.Loaders.JSONLoader import JSONLoader
from neumai.Chunkers.RecursiveChunker import RecursiveChunker
from neumai.Sources.SourceConnector import SourceConnector
from neumai.EmbedConnectors import OpenAIEmbed
from neumai.SinkConnectors import WeaviateSink
from neumai.Pipelines import Pipeline
website_connector = PostgresConnector(
connection_string = 'postgres',
query = 'Select * from ...'
)
source = SourceConnector(
data_connector = website_connector,
loader = JSONLoader(
id_key='<your id key of your jsons>',
selector=Selector(
to_embed=['property1_to_embed','property2_to_embed'],
to_metadata=['property3_to_include_in_metadata_in_vector']
)
),
chunker = RecursiveChunker()
)
openai_embed = OpenAIEmbed(
api_key = "<OPEN AI KEY>",
)
weaviate_sink = WeaviateSink(
url = "your-weaviate-url",
api_key = "your-api-key",
class_name = "your-class-name",
)
pipeline = Pipeline(
sources=[source],
embed=openai_embed,
sink=weaviate_sink
)
pipeline.run()
results = pipeline.search(
query="...",
number_of_results=3
)
for result in results:
print(result.metadata)
```
</details>
<details><summary>
### Publishing pipeline to Neum Cloud
</summary>
```python
from neumai.Client.NeumClient import NeumClient
client = NeumClient(
api_key='<your neum api key, get it from https://dashboard.neum.ai',
)
client.create_pipeline(pipeline=pipeline)
```
</details>
### Self-host
If you are interested in deploying Neum AI to your own cloud contact us at [
[email protected]](mailto:
[email protected]).
We have a sample backend architecture published on [GitHub](https://github.com/NeumTry/neum-at-scale) which you can use as a starting point.
## Available Connectors
For an up-to-date list please visit our [docs](https://docs.neum.ai/components/sourceConnector)
<details>
### Source connectors
1. Postgres
2. Hosted Files
3. Websites
4. S3
5. Azure Blob
6. Sharepoint
7. Singlestore
8. Supabase Storage
### Embed Connectors
1. OpenAI embeddings
2. Azure OpenAI embeddings
### Sink Connectors
1. Supabase postgres
2. Weaviate
3. Qdrant
4. Pinecone
5. Singlestore
</details>
## Roadmap
Our roadmap is evolving with asks, so if there is anything missing feel free to open an issue or send us a message.
<details>
Connectors
- [ ] MySQL - Source
- [ ] GitHub - Source
- [ ] Google Drive - Source
- [ ] Hugging Face - Embedding
- [x] LanceDB - Sink
- [x] Marqo - Sink
- [ ] Milvus - Sink
- [ ] Chroma - Sink
Search
- [x] Retrieval feedback
- [x] Filter support
- [x] Unified Neum AI filters
- [ ] Smart routing (w/ embedding based classification)
- [ ] Smart routing (w/ LLM based classification)
- [ ] Self-Query Retrieval (w/ Metadata attributes generation)
Extensibility
- [x] Langchain / Llama Index Document to Neum Document converter
- [ ] Custom chunking and loading
Experimental
- [ ] Async metadata augmentation
- [ ] Chat history connector
- [ ] Structured (SQL and GraphQL) search connector
</details>
## Neum Tools
Additional tooling for Neum AI can be found here:
- [neumai-tools](https://pypi.org/project/neumai-tools/): contains pre-processing tools for loading and chunking data before generating vector embeddings.
", Assign "at most 3 tags" to the expected json: {"id":"5233","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"