Skip to main content

llama-metasearch

PyPI version License Python Version CI Status

Llama Metasearch (llama-metasearch) is a powerful metasearch engine within the LlamaSearch AI ecosystem. It aggregates results from multiple underlying search sources, ranks them, and presents a unified set of results to the user.

Key Features

  • Metasearch Engine: Core logic for querying multiple sources and combining results (metasearch.py).
  • Source Aggregation: Fetches results from various configured search engines or APIs.
  • Result Ranking: Implements algorithms to rank aggregated results effectively.
  • Unified API: Provides a single point of access for querying diverse sources.
  • Core Module: Manages the overall metasearch process (core.py).
  • Configurable: Allows defining search sources, ranking parameters, and other settings (config.py).

Installation

pip install llama-metasearch
# Or install directly from GitHub for the latest version:
# pip install git+https://github.com/llamasearchai/llama-metasearch.git

Usage

(Usage examples demonstrating how to perform metasearch queries will be added here.)

# Placeholder for Python client usage
# from llama_metasearch import MetasearchClient, SearchConfig

# config = SearchConfig.load("config.yaml")
# client = MetasearchClient(config)

# # Perform a metasearch query
# results = client.search("artificial intelligence trends", sources=["web", "news", "academic"])
# for result in results:
#     print(f"[{result.source}] {result.title} - {result.url}")

Architecture Overview

graph TD
    A[User Query] --> B{Core Orchestrator (core.py)};
    B --> C{Metasearch Engine (metasearch.py)};
    C -- Queries --> D[Source 1 Interface];
    C -- Queries --> E[Source 2 Interface];
    C -- Queries --> F[...];
    D --> G((Source 1 API / DB));
    E --> H((Source 2 API / DB));
    F --> I((...));
    G -- Results --> C;
    H -- Results --> C;
    I -- Results --> C;
    C --> J{Result Aggregation & Ranking};
    J --> K[Unified Search Results];

    L[Configuration (config.py)] -- Configures --> B;
    L -- Configures --> C;
    L -- Configures --> D;
    L -- Configures --> E;
    L -- Configures --> F;

    style C fill:#f9f,stroke:#333,stroke-width:2px
  1. Query Input: The user submits a search query.
  2. Core Orchestrator: Manages the request flow.
  3. Metasearch Engine: Receives the query and dispatches it to configured source interfaces.
  4. Source Interfaces: Interact with the actual underlying search sources (APIs, databases, etc.).
  5. Aggregation & Ranking: The engine gathers results from all sources, deduplicates, and ranks them.
  6. Output: Presents a unified list of ranked results.
  7. Configuration: Defines which sources to query, API keys, ranking strategies, etc.

Configuration

(Details on configuring search sources, API keys, ranking algorithms, result caching, etc., will be added here.)

Development

Setup

# Clone the repository
git clone https://github.com/llamasearchai/llama-metasearch.git
cd llama-metasearch

# Install in editable mode with development dependencies
pip install -e ".[dev]"

Testing

pytest tests/

Contributing

Contributions are welcome! Please refer to CONTRIBUTING.md and submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for llama-metasearch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-metasearch 0.1.0
File Size Uploaded
llama_metasearch-0.1.0.tar.gz 38.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-metasearch 0.1.0
File Interpreter ABI Platform
llama_metasearch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 70.2 kB

Release files / llama_metasearch-0.1.0.tar.gz

Download URL llama_metasearch-0.1.0.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ffa6e88b5f8cacbbe8488de82e6f2de04cd3b89f675be3bb98e6f46542425e22
BLAKE2b-256 checksum
How to use checksums
00d2600ce206fbef5b772b53cdabd57502607d9b446316acf86319b4efd39d61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / llama_metasearch-0.1.0-py3-none-any.whl

Download URL llama_metasearch-0.1.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d7dbeb58dafa658115e83ef18813e9a51966068284b0133b536409a065af7da
BLAKE2b-256 checksum
How to use checksums
c434c3eb2ea8308b49947071c0c9932cb79d70950374d02bbf535085808fc88a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page