Operator-ready prompt for reuse, tuning, and workspace runs.
This item is set up for developers who want to inspect the original language, fork it into Workspace, and adapt the evidence model without losing the source prompt structure.
Implementation handoffs, eval setup, and prompt tuning where you need the original structure intact.
Inspect first, copy once, then fork into Workspace when you want variants, notes, and model settings attached to the same run.
Swap domain facts, examples, and any hard-coded entities for your own context.
Tighten the evidence or verification requirement if this is headed toward production.
Decide which failure mode you want to evaluate first before you branch the prompt.
This prompt already carries implementation detail, tool context, and a final-output instruction. Keep that structure intact when you tune it, or your comparison runs get noisy fast.
Open this prompt inside Workspace when you want a live iteration loop.
Copy for quick reuse, or run it in Workspace to keep prompt variants, model settings, and prompt-history changes in one place.
Structured source with 21 active lines to adapt.
Already linked to a challenge workflow.
Sign in to keep private prompt variations.
Prompt content
Original prompt text with formatting preserved for inspection and clean copy.
Building upon your LlamaIndex data pipeline, implement an agentic query engine capable of handling complex queries. The agent should be able to break down a high-level query like 'Analyze the strategic implications of the Musk vs. OpenAI lawsuit by summarizing key legal points and market reactions' into sub-queries. Utilize `QueryEngineTool` and `LlamaPack` or a custom `RouterQueryEngine` to orchestrate this process with GPT-4o. Show how the agent routes questions to specific sub-query engines or tools. Include Python code.
```python
from llama_index.core import VectorStoreIndex, Document
from llama_index.core.tools import QueryEngineTool, ToolMetadata
from llama_index.core.agent import AgentRunner
from llama_index.llms.openai import OpenAI
from llama_index.vector_stores.pinecone import PineconeVectorStore
# ... other necessary imports
# Assume 'legal_index' and 'news_index' are already created VectorStoreIndex instances
# backed by PineconeVectorStore
legal_query_engine = legal_index.as_query_engine(similarity_top_k=3)
news_query_engine = news_index.as_query_engine(similarity_top_k=5)
legal_tool = QueryEngineTool(query_engine=legal_query_engine, metadata=ToolMetadata(name='legal_analyzer', description='Provides summaries and context from legal documents and filings.'))
news_tool = QueryEngineTool(query_engine=news_query_engine, metadata=ToolMetadata(name='market_news_analyzer', description='Provides insights and sentiment from market news articles and reports.'))
llm = OpenAI(model='gpt-4o', api_key='YOUR_OPENAI_API_KEY')
# Your task: Initialize an agent (e.g., FunctionCallingAgentWorker or ReActAgent) with these tools
# and demonstrate how it handles a complex query.
# For example, using AgentRunner with a custom agent worker:
# agent = AgentRunner(your_agent_worker)
# response = agent.chat('Analyze the strategic implications of the Musk vs. OpenAI lawsuit...')
```Adaptation plan
Keep the source stable, then branch your edits in a predictable order so the next prompt run is easier to evaluate.
Hold the task contract and output shape stable so generated implementations remain comparable.
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.
Copy once for a pristine source snapshot, then move the prompt into Workspace when you want variants, run history, and side-by-side tuning without losing the original.
Prompt diagnostics
Quick signals for how structured this prompt already is and where adaptation work is likely to happen first.
This prompt already mixes executable detail with instructions, so the safest path is to tune examples and interfaces before you rewrite the overall scaffold.
LLM-Powered Legal & Market Intelligence
Develop an advanced RAG-powered agent system using LlamaIndex to analyze complex legal filings and market intelligence related to high-profile disputes, such as the Elon Musk vs. OpenAI/Microsoft lawsuit. The system will ingest diverse data sources - legal documents, news articles, company statements, and financial reports - to provide comprehensive summaries, strategic insights, and historical context. This challenge emphasizes LlamaIndex's capabilities in multi-document retrieval, hierarchical indexing, and agentic query planning to navigate vast, unstructured datasets. The solution requires designing a robust data pipeline that connects various enterprise data sources, indexes them effectively for semantic search, and employs an agentic query engine to synthesize information. Participants will build custom tools for data extraction and transformation, ensuring the LLM (GPT-4o) can access and reason over highly specific and sometimes contradictory information to generate accurate and actionable intelligence reports.
Use the challenge page to recover the original task boundaries before you tune the prompt. That keeps your variants grounded in the same evaluation target instead of drifting into a different problem.