Back to Prompt Library
planning
LlamaIndex Agent for Data Integration and Analysis
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: LlamaIndex-Powered AI Supply Chain Optimizer with GPT-5 Pro and Multi-Model Inference
Format
Code-aware
Lines
9
Sections
1
Linked challenge
LlamaIndex-Powered AI Supply Chain Optimizer with GPT-5 Pro and Multi-Model Inference
Prompt source
Original prompt text with formatting preserved for inspection.
9 lines
1 sections
No variables
1 code block
Initialize a LlamaIndex agent focused on 'Supply Chain Data Integration'. This agent should be able to process structured data (simulated inventory, supplier capacity) and unstructured data (market reports). Define custom tools that the agent can use to 'query_inventory_db' and 'analyze_market_report'. Use GPT-5 Pro for high-level reasoning within the agent. Provide a basic LlamaIndex agent setup with these tools. ```python from llama_index.llms import OpenAI, Anthropic from llama_index.core.agent import AgentRunner from llama_index.core.tools import FunctionTool from llama_index.core.agent import ReActAgent # Assume GPT-5 Pro is configured via OpenAI API (replace with actual model ID) llm_gpt5_pro = OpenAI(model="gpt-5-pro") def query_inventory_db(component_name: str) -> str: """Queries the simulated inventory database for a specific component.""" # Placeholder for actual database query or API call if component_name == "N3_wafers": return "Current N3_wafers inventory: 800 units." return "Component not found." query_tool = FunctionTool.from_defaults(fn=query_inventory_db, name="query_inventory_db", description="Query the inventory database for component levels.") # Define the agent agent = ReActAgent.from_tools( tools=[query_tool], llm=llm_gpt5_pro, verbose=True ) # ... (further agent interaction) ```
Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Preserve the role framing, objective, and reporting structure so comparison runs stay coherent.
Tune next
Swap in your own domain constraints, anomaly thresholds, and examples before you branch variants.
Verify after
Check whether the prompt asks for the right evidence, confidence signal, and escalation path.