Skip to content

research

gitpavleenbali edited this page Feb 17, 2026 · 2 revisions

research

The research function performs deep topic research with source citations.

Import

from pyai import research

Basic Usage

# Simple research
results = research("machine learning trends 2024")

# With specific depth
results = research("quantum computing", depth="deep")

# Async version  
results = await research.async_("AI ethics")

Parameters

Parameter Type Default Description
topic str required Topic to research
depth str "normal" Research depth: "quick", "normal", "deep"
sources int 5 Number of sources to include
format str "markdown" Output format

Return Value

Returns a structured research report with:

  • Summary
  • Key findings
  • Source citations
  • Further reading suggestions

Examples

Basic Research

from pyai import research

# Quick research
report = research("Python async programming")
print(report)

Deep Research

# Comprehensive research with more sources
report = research(
    "artificial general intelligence",
    depth="deep",
    sources=10
)

Async Research

import asyncio
from pyai import research

async def main():
    report = await research.async_("blockchain technology")
    print(report)

asyncio.run(main())

Output Format

# Research: Machine Learning Trends 2024

## Summary
Machine learning continues to evolve with focus on...

## Key Findings
1. Large Language Models dominate...
2. Edge ML gaining traction...

## Sources
- [Source 1](https://example.com)
- [Source 2](https://example.com)

## Further Reading
- Topic A
- Topic B

See Also

🧠 PYAI Wiki

Home


πŸš€ Getting Started


πŸ’‘ Core Concepts


🎯 One-Liner APIs


πŸ€– Agent Framework


πŸ”— Multi-Agent


πŸ› οΈ Tools & Skills


🏒 Enterprise


πŸŽ™οΈ Voice


πŸ–ΌοΈ Multimodal


πŸ“Š Vector DB


🌐 OpenAPI


πŸ”Œ Plugins


🀝 A2A Protocol


πŸ”’ Security


πŸ“š Reference


Intelligence, Embedded.

Clone this wiki locally