GitHub

Introduction to Functor

Functor is a powerful system that combines knowledge graphs, vector databases, and large language models to provide intelligent data processing and natural language querying capabilities. The system is built around a MainOrchestrator that coordinates three primary pipelines: Data Ingestion, Retrieval, and Prediction.

What is Functor?

Functor is an advanced system that transforms unstructured data into structured knowledge through automated extraction, processing, and intelligent querying. It's designed to handle complex data ingestion workflows while providing natural language access to your knowledge base. The system uses a MainOrchestrator-based architecture that coordinates UnifiedIngestionPipeline, MultiKGRetrievalPipeline, and KnowledgeGroundingPipeline.

System Architecture

The system is built around the MainOrchestrator that coordinates three primary pipelines:

  • Pipeline 1: Data Ingestion - UnifiedIngestionPipeline for document processing and KG construction
  • Pipeline 2: Retrieval - MultiKGRetrievalPipeline for multi-KG search with domain detection
  • Pipeline 3: Prediction - KnowledgeGroundingPipeline for answer generation and validation

Core Components

Knowledge Graphs

Structured representations of entities, relationships, and facts extracted from your data.

  • • Entity extraction and linking
  • • Relationship mapping
  • • Hierarchical knowledge organization
  • • Multi-domain knowledge support

Vector Database

High-dimensional embeddings for semantic search and similarity matching.

  • • Semantic similarity search
  • • Context-aware retrieval
  • • Multi-modal embeddings
  • • Scalable vector operations

Language Models

Advanced LLMs for natural language understanding and generation.

  • • Natural language querying
  • • Context-aware responses
  • • Multi-step reasoning
  • • Citation and source tracking

Memory System

Persistent memory for episodic experiences and long-term knowledge retention.

  • • Episodic memory storage
  • • Semantic fact management
  • • Procedural knowledge
  • • Memory consolidation

Key Capabilities

🚀 Intelligent Data Ingestion

Automatically process documents, web pages, and structured data to build comprehensive knowledge graphs. Support for multiple formats including PDF, HTML, JSON, and more.

🔍 Natural Language Querying

Ask questions in plain English and get accurate, contextual answers with source citations. The system understands complex queries and can perform multi-step reasoning.

🧠 Advanced Memory Management

Store and retrieve episodic experiences, semantic facts, and procedural knowledge. The memory system learns from interactions and improves over time.

🔗 Multi-Agent Integration

Seamlessly integrate with LangChain, CAMEL-AI, and other agent frameworks through the Model Context Protocol (MCP) interface.

Use Cases

Research & Analysis

Process research papers, reports, and documents to build domain-specific knowledge bases for intelligent analysis and discovery.

Customer Support

Create intelligent chatbots that can answer complex questions using your product documentation and support knowledge base.

Content Management

Organize and search through large content libraries with semantic understanding and intelligent categorization.

Business Intelligence

Transform unstructured business data into actionable insights through natural language queries and automated analysis.

Architecture Overview

Functor follows a modular architecture that separates concerns and enables flexible deployment options:

System Architecture

API Layer: RESTful endpoints for all operations
Processing Pipeline: Automated data extraction and processing
Knowledge Graph: Neo4j-based graph database
Vector Database: Qdrant for semantic search
Memory System: Persistent storage for experiences and facts

Getting Started

Ready to start building with Functor? Here's how to get up and running:

Example: Your First Query

Here's a quick example of what you can do with Functor:

first_query.py
from functor_sdk import FunctorClient
# Initialize the client
client = FunctorClient(api_key="your-api-key")
# Upload a document
upload_result = client.ingestion.upload_url(
url="https://example.com/research-paper.pdf",
kg_name="KG_Universal"
)
# Wait for processing to complete
print(f"Document uploaded: {upload_result.job_id}")
# Query the knowledge base
result = client.queries.execute(
query="What are the main findings in the research paper?",
max_results=5,
include_citations=True
)
print(f"Answer: {result.answer}")
print(f"Sources: {len(result.citations)} citations found")

Next Steps

Now that you understand what Functor can do, let's get you set up: