scientific_research.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your API keys
4
Run the example
Save the code above as
scientific_research.py, then run:Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Critique a small-sample teaching-method abstract for bias and flawed conclusions, comparing gpt-4o built-in chain-of-thought with a deepseek-reasoner reasoning model.
"""
Scientific Abstract Critique
============================
Demonstrates DeepSeek-backed reasoning for methodology critique.
"""
from agno.agent import Agent
from agno.models.deepseek import DeepSeek
from agno.models.openai import OpenAIResponses
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
task = (
"Read the following abstract of a scientific paper and provide a critical evaluation of its methodology,"
"results, conclusions, and any potential biases or flaws:\n\n"
"Abstract: This study examines the effect of a new teaching method on student performance in mathematics. "
"A sample of 30 students was selected from a single school and taught using the new method over one semester. "
"The results showed a 15% increase in test scores compared to the previous semester. "
"The study concludes that the new teaching method is effective in improving mathematical performance among high school students."
)
agent = Agent(
model=OpenAIResponses(id="gpt-5.6"),
reasoning_model=DeepSeek(id="deepseek-reasoner"),
markdown=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
agent.print_response(task, stream=True, show_full_reasoning=True)
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
Install dependencies
uv pip install -U agno openai
Export your API keys
export DEEPSEEK_API_KEY="your_deepseek_api_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"
$Env:DEEPSEEK_API_KEY="your_deepseek_api_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
Run the example
scientific_research.py, then run:python scientific_research.py