NeumAI
neumai 0.0.40
首頁 |文檔 |部落格 |不和諧|嘰嘰喳喳
Neum AI 是一個資料平台,可協助開發人員利用資料透過檢索增強生成 (RAG) 將大型語言模型置於上下文中,這包括從文件儲存和NoSQL 等現有資料來源中提取數據,將內容處理為向量嵌入,並將向量嵌入引入用於相似性搜尋的向量資料庫。
它為您提供了全面的 RAG 解決方案,可以根據您的應用程式進行擴展,並減少整合式資料連接器、嵌入模型和向量資料庫等服務所花費的時間。
您可以透過電子郵件 ([email protected])、discord 或安排與我們通話聯絡我們的團隊。
立即在dashboard.neum.ai 上註冊。請參閱我們的快速入門以開始使用。
Neum AI Cloud 支援大規模分散式架構,透過向量嵌入運行數百萬個文件。有關完整的功能集,請參閱:雲端與本地
安裝neumai
包:
pip install neumai
要建立您的第一個資料管道,請造訪我們的快速入門。
在較高層級上,管道由一個或多個用於從中提取資料的來源、一個用於對內容進行向量化的嵌入連接器以及一個用於儲存所述向量的接收器連接器組成。透過這段程式碼,我們將製作所有這些並運行管道:
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 )
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 )
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 )
如果您有興趣將 Neum AI 部署到您自己的雲端中,請透過[email protected] 與我們聯絡。
我們在 GitHub 上發布了一個範例後端架構,您可以將其用作起點。
如需最新列表,請造訪我們的文檔
我們的路線圖隨著詢問而不斷發展,因此如果有任何遺漏,請隨時提出問題或向我們發送訊息。
連接器
搜尋
可擴展性
實驗性的
Neum AI 的其他工具可以在這裡找到: