aurelio-labs/semantic-router

Superfast AI decision making and intelligent processing of multi-modal data.

What it solves

Semantic Router は LLM と AI エージェント向けに高速な意思決定レイヤーを提供します。どのツールを使用するか、リクエストをどのようにルーティングするかを決めるために遅い LLM 生成を待つ必要がなくなり、レイテンシが低減し応答時間が向上します。

How it works

このプロジェクトはクエリの分類に LLM を使用せず、セマンティックベクトル空間を利用します。開発者は例示的な発話セットを含む Route オブジェクトを定義できます。ユーザークエリが来ると、クエリをベクトルにエンコードし、ルートの発話ベクトルと比較して意味的に最も適切なパスを決定します。

Who it’s for

LLM を活用したアプリケーションや AI エージェントを構築する開発者で、コストが高いまたは遅い LLM 呼び出しに依存せず、迅速かつ効率的にインテント分類とリクエストルーティングを行いたい方。

Highlights

  • Fast Decision Making: Uses vector embeddings rather than LLM generation for routing decisions.
  • Flexible Encoders: Supports multiple embedding providers including Cohere, OpenAI, Hugging Face, and FastEmbed.
  • Local Execution: Ability to run fully local versions using HuggingFaceEncoder and LlamaCppLLM.
  • Vector DB Integration: Integrates with Pinecone and Qdrant for managing utterance vector spaces.
  • Multi-modal Support: Capable of routing based on multi-modal inputs (e.g., identifying images).
  • Agent Framework Integration: Works with LangChain Agents.