How SearchAF Works

From raw data to instant AI answers. A complete pipeline in minutes.

The answer engine pipeline

SearchAF handles the complexity so you can focus on your product.

Step 1

Connect

One-click integrations

Connect your data sources with one-click integrations. Shopify, GitHub, WordPress, S3, and more.

import { SearchAF } from '@searchaf/sdk';

const client = new SearchAF({
  apiKey: process.env.SEARCHAF_KEY
});

// Connect your Shopify store
await client.connect('shopify', {
  shop: 'mystore.myshopify.com'
});
Step 2

Ingest

Automatic sync

Background workers sync your content automatically. Real-time webhooks and incremental updates.

// Batch upload documents
await client.documents.batch([
  {
    id: 'doc-1',
    title: 'Product Guide',
    content: 'Complete guide to our products...'
  },
  {
    id: 'doc-2',
    title: 'FAQ',
    content: 'Frequently asked questions...'
  }
]);
Step 3

Process

Intelligent processing

Automatic chunking, entity extraction, and embedding generation. No ML expertise required.

No ML expertise required
// Processing happens automatically on ingest
// Optionally configure chunking strategy
await client.configure({
  chunking: {
    strategy: 'semantic',
    maxTokens: 512
  },
  embeddings: {
    model: 'text-embedding-3-small'
  }
});
Step 4

Store

Distributed storage

Hybrid vector + keyword index for fast retrieval. Powered by AntflyDB.

Powered by AntflyDB
// Data is indexed automatically after processing
// Check indexing status
const status = await client.index.status();

console.log(`Documents: ${status.documentCount}`);
console.log(`Indexed: ${status.indexedCount}`);
console.log(`Status: ${status.state}`);
Step 5

Query

Lightning fast search

Hybrid search API combining keyword + semantic matching. Sub-50ms latency.

Sub-50ms latency
const results = await client.search({
  query: 'wireless headphones under $100',
  limit: 10,
  filters: {
    category: 'electronics',
    inStock: true
  }
});

results.hits.forEach(hit => {
  console.log(hit.title, hit.score);
});
Step 6

Answer

Grounded AI answers

AI-generated answers grounded in your data. RAG pipeline with citation support.

With citations
const answer = await client.answer({
  question: "What's your return policy?",
  stream: true,
  includeSources: true
});

// Stream the response
for await (const chunk of answer) {
  process.stdout.write(chunk.text);
}

// Access cited sources
console.log('Sources:', answer.sources);

Ready to build your answer engine?

Get started for free. No credit card required.