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).

Links

License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llamaindex_lastsearch-1.0.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llamaindex_lastsearch-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file llamaindex_lastsearch-1.0.0.tar.gz.

File metadata

  • Download URL: llamaindex_lastsearch-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for llamaindex_lastsearch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a051611f34888eb5644d4dd29886f9c3874bc480c887e5edb1deadb40d361e8b
MD5 56335d26cc120be5762b9d84a1db6f6d
BLAKE2b-256 262f7d97606fe98e15bc5829fa4c26559c8dc17218323b4e8731a7ed499d15b3

See more details on using hashes here.

File details

Details for the file llamaindex_lastsearch-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llamaindex_lastsearch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b45346ebf055420e723594073f7ea8a8a1ee2075016c8ebe94a3ded9e04c3a8d
MD5 cd8a72df5d4e722c4038148bd38461a0
BLAKE2b-256 74f99a84b1d38bc8cc6169637288907f0cb7929b9e302ecfc293ef7001980871

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 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