跳到主要内容
Smabbler 的图谱驱动平台通过将数据转化为结构化知识基础,促进了人工智能开发。

Galaxia

Galaxia 知识库是一个用于 RAG 的集成知识库和检索机制。与标准解决方案相比,它基于使用符号 NLP 和知识表示解决方案构建的知识图谱。所提供的文本经过分析并转换为包含文本、语言和语义信息的图谱。这种丰富的结构允许基于语义信息进行检索,而不是基于向量相似度/距离。
使用 Galaxia 实现 RAG 涉及首先将文件上传到 Galaxia,在那里进行分析,然后构建一个模型(知识图谱)。模型构建完成后,您可以使用 GalaxiaRetriever 连接到 API 并开始检索。 更多信息:文档

安装

pip install langchain-galaxia-retriever

用法

from langchain_galaxia_retriever.retriever import GalaxiaRetriever

gr = GalaxiaRetriever(
    api_url="beta.api.smabbler.com",
    api_key="<key>",
    knowledge_base_id="<knowledge_base_id>",
    n_retries=10,
    wait_time=5,
)

result = gr.invoke('<test question>')
print(result)

---

<Callout icon="pen-to-square" iconType="regular">
    [Edit the source of this page on GitHub.](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/providers/galaxia.mdx)
</Callout>
<Tip icon="terminal" iconType="regular">
    [Connect these docs programmatically](/use-these-docs) to Claude, VSCode, and more via MCP for    real-time answers.
</Tip>
© . This site is unofficial and not affiliated with LangChain, Inc.