Website • Documentation • Skelf Research
LORG is an AI-powered search engine that combines Large Language Models with knowledge graph generation to deliver precise, context-aware answers. Unlike traditional search, LORG understands your query, builds a knowledge graph, and intelligently scores web results for relevance.
Stop searching. Start finding.
- AI-First Search - Generates answers using GPT models before searching the web
- Knowledge Graphs - Automatically extracts entities and relationships from queries
- Smart Ranking - Uses AI to score results by actual relevance, not just keywords
- Multi-Engine - Aggregates results from Google, Bing, Yahoo & DuckDuckGo
- Flexible - Use as CLI, REST API, Node.js library, or full web app
# Install globally
npm install -g lorg
# Set your OpenAI API key
export OPENAI_API_KEY=sk-your-key-here
# Search!
lorg "What causes the northern lights?"Output:
Searching for: "What causes the northern lights?"
=== LLM Answer ===
The northern lights (aurora borealis) are caused by charged particles
from the sun colliding with gases in Earth's atmosphere...
=== Knowledge Graph ===
{ entities: ["aurora", "solar wind", "magnetosphere", ...] }
=== Search Results ===
1. Aurora Borealis Explained (Score: 0.94)
Source: https://science.nasa.gov/aurora
Total tokens used: 1,247
# Global (for CLI)
npm install -g lorg
# Local (for library use)
npm install lorgRequirements: Node.js 18+ and an OpenAI API key
# Basic search
lorg "How do black holes form?"
# Use GPT-4 for higher quality
lorg -m gpt-4o "Explain quantum entanglement"
# Limit to 3 results
lorg -r 3 "Best practices for React hooks"# Start the server
lorg server -p 3000
# Query via curl
curl -X POST http://localhost:3000/search \
-H "Content-Type: application/json" \
-d '{"query": "How does CRISPR work?"}'import LorgSearch from 'lorg';
const lorg = new LorgSearch(process.env.OPENAI_API_KEY);
const results = await lorg.search('What is quantum computing?', {
model: 'gpt-4o-mini',
maxResults: 5
});
console.log(results.answer); // AI-generated answer
console.log(results.knowledgeGraph); // Extracted entities & relationships
console.log(results.keywords); // Search keywords
console.log(results.results); // Ranked web results
console.log(results.tokenCount); // Tokens consumedQuery → LLM Answer → Knowledge Graph → Keywords → Web Search → AI Ranking → Results
- Answer Generation - GPT generates an initial answer and knowledge graph
- Keyword Extraction - AI extracts optimal search terms from the graph
- Multi-Engine Search - Queries Google, Bing, Yahoo & DuckDuckGo via SearxNG
- Content Analysis - Fetches pages and extracts relevant content
- Relevance Scoring - AI scores each result (0-1) for query relevance
- Result Ranking - Returns top results sorted by relevance score
| Environment Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY |
- | Your OpenAI API key (required) |
OPENAI_BASE_URL |
OpenAI | Custom OpenAI-compatible endpoint |
LORG_DEFAULT_MODEL |
gpt-4o-mini |
Default model for all operations |
LORG_SEARCH_ENGINES |
google,bing,yahoo,duckduckgo |
Search engines to use |
LORG_SEARCH_LIMIT |
20 |
Max results from search API |
Create a new LORG instance. Falls back to OPENAI_API_KEY env var.
| Option | Type | Default | Description |
|---|---|---|---|
model |
string | gpt-4o-mini |
OpenAI model to use |
maxResults |
number | 5 |
Maximum results to return |
Returns:
{
answer: string; // AI-generated answer
knowledgeGraph: object; // Entities and relationships
keywords: string[]; // Extracted search keywords
results: Array<{
title: string;
source: string;
score: number; // 0-1 relevance score
content: string;
}>;
tokenCount: number; // Total tokens used
}Full documentation available at docs.skelfresearch.com/slorg
- Research Assistants - Get accurate answers with sources
- Content Discovery - Find relevant articles ranked by AI
- RAG Pipelines - High-quality retrieval for LLM applications
- Knowledge Base Search - Semantic search over web content
- Fact Checking - Verify claims with scored sources
Contributions are welcome! Please see our GitHub repository.
git clone https://github.com/skelf-research/slorg.git
cd slorg
npm install
npm run devMIT License - see LICENSE for details.
Built with AI, for AI-powered applications
GitHub ·
Documentation ·
npm
slorg is built by Skelf Research — an independent UK AI research lab publishing production-grade open-source projects.
🌐 Website · 📚 Documentation · 🔬 All projects · 🤗 Hugging Face
Related projects: polymathy (answer-engine service) · memista (vector search for Rust) · embedcache (local embedding cache)
Released under MIT / Apache-2.0. © Skelf Research Limited.