Skip to main content
Stardog is an enterprise knowledge graph platform that enables organizations to unify, query, and analyze their data.
This integration package provides langchain tools and runnables for interacting with Stardog Voicebox, which is a 自然语言 answering agent providing hallucination-free insights from your enterprise data.

概述

The Stardog LangChain integration package provides the following tools for working with Stardog Voicebox:
  • VoiceboxAskTool - Ask questions and get 自然语言 answers
  • VoiceboxGenerateQueryTool - Generate SPARQL queries from 自然语言
  • VoiceboxSettingsTool - Retrieve Voicebox application settings
All tools support both synchronous and asynchronous execution modes, making them suitable for various application architectures. For complete details, see the GitHub repository.

设置

安装

前提条件

  • A Stardog Cloud account
  • A Voicebox application configured with your data
  • A Voicebox API token

Getting your API token

  1. Log in to Stardog Cloud
  2. Click on your profile icon and select Manage API Keys.
  3. Create a new application and generate a secret.
  4. Copy the API token and keep it secure.
  5. 更多详情, see Stardog Voicebox API access.

凭证

Set your API token as an environment variable:
Optional environment variables:

Instantiation and examples

VoiceboxAskTool

Ask 自然语言 questions relevant to the knowledge graph configured with your API token, and receive hallucination-free answers.

VoiceboxSettingsTool

Retrieve Voicebox application configuration and metadata.

VoiceboxGenerateQueryTool

Generate SPARQL queries for the 自然语言 question without executing them.
Refer to the Examples section for different ways to use these tools and runnables.

Class reference

更多详情, see Class Reference Available classes:
  • VoiceboxAskTool - Ask questions and get answers
  • VoiceboxSettingsTool - Retrieve application settings
  • VoiceboxGenerateQueryTool - Generate SPARQL queries
  • VoiceboxAskRunnable - Runnable for asking 自然语言 questions
  • VoiceboxSettingsRunnable - Settings retrieval runnable
  • VoiceboxGenerateQueryRunnable - Query generation runnable
  • VoiceboxClient - Core client for Voicebox API

Learn more