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 detectionLastSearchSearchTool— Web search returning ranked resultsLastSearchExtractTool— Extract structured claims from a URLLastSearchCompareTool— 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
- Website · GitHub · Discord
- Python SDK · LangChain · CrewAI · MCP Server
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a051611f34888eb5644d4dd29886f9c3874bc480c887e5edb1deadb40d361e8b
|
|
| MD5 |
56335d26cc120be5762b9d84a1db6f6d
|
|
| BLAKE2b-256 |
262f7d97606fe98e15bc5829fa4c26559c8dc17218323b4e8731a7ed499d15b3
|
File details
Details for the file llamaindex_lastsearch-1.0.0-py3-none-any.whl.
File metadata
- Download URL: llamaindex_lastsearch-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b45346ebf055420e723594073f7ea8a8a1ee2075016c8ebe94a3ded9e04c3a8d
|
|
| MD5 |
cd8a72df5d4e722c4038148bd38461a0
|
|
| BLAKE2b-256 |
74f99a84b1d38bc8cc6169637288907f0cb7929b9e302ecfc293ef7001980871
|