Skip to main content

llamaindex-lastsearch

LlamaIndex integration for LastSearch — verified web search with citations and confidence scores for AI agents.

Installation

pip install llamaindex-lastsearch

Quick Start

from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
from llamaindex_lastsearch import LastSearchAnswerTool, LastSearchSearchTool

# Create tools
answer_tool = LastSearchAnswerTool(api_key="ls_xxx")
search_tool = LastSearchSearchTool(api_key="ls_xxx")

# Create agent
llm = OpenAI(model="gpt-4o")
agent = ReActAgent.from_tools([answer_tool, search_tool], llm=llm, verbose=True)

# Research with verified answers
response = agent.chat("What are the latest findings on mRNA vaccine efficacy?")
print(response)

Available Tools

  • LastSearchAnswerTool — Verified research with citations, confidence scores, contradiction detection
  • LastSearchSearchTool — Web search returning ranked results
  • LastSearchExtractTool — Extract structured claims from a URL
  • LastSearchCompareTool — Compare raw LLM vs verified answer

All tools are returned as FunctionTool instances, compatible with any LlamaIndex agent.

Why LastSearch?

Unlike raw search APIs, LastSearch fact-checks results. Every answer includes per-claim verification, cross-source consensus, contradiction detection, and evidence-based confidence scores. Open source (Apache 2.0).

License

Apache 2.0

Data, privacy and terms

This package sends your requests (queries, URLs and documents you ask it to verify) and your LastSearch API key to the hosted LastSearch API at lastsearch.ai. Queries and results are stored there and used, in aggregate and without identifiers, to improve verification, as described in the Privacy Policy. The package itself collects no telemetry. Use of the hosted API is subject to the Terms.

LastSearch is a free, non-commercial passion project run by an individual developer. Answers, citations and confidence scores are AI-generated research, not professional advice; verify anything important against primary sources.

Metadata

Release files for llamaindex-lastsearch 1.0.1

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

Source distribution (sdist)

Source distribution for llamaindex-lastsearch 1.0.1
File Size Uploaded Provenance Actions
llamaindex_lastsearch-1.0.1.tar.gz 8.2 kB Without provenance Details for llamaindex_lastsearch-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llamaindex-lastsearch 1.0.1
File Interpreter ABI Platform Actions
llamaindex_lastsearch-1.0.1-py3-none-any.whl Python 3 none any Details for llamaindex_lastsearch-1.0.1-py3-none-any.whl

Total release size: 17.3 kB

Release files / llamaindex_lastsearch-1.0.1.tar.gz

Download URL llamaindex_lastsearch-1.0.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6227a85124d004f02d59cdb35b1dcdb0f2cf73ed88d276c0c2a8a9b1a3e21907
BLAKE2b-256 checksum
How to use checksums
6d3c08f6a184ec327f335fbd4176c183184c374473eaee7cf6ba9f47f7219786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / llamaindex_lastsearch-1.0.1-py3-none-any.whl

Download URL llamaindex_lastsearch-1.0.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
487d27f645556ebdc9605f0e06a541dadcba5c82692e7fa146376b60a9cb7fa0
BLAKE2b-256 checksum
How to use checksums
0fe2b3ecb60e78ca97e046195a22bcc372652693db67a7c84aa6c976c62ff432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for llamaindex-lastsearch 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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