Back to Prompt Library
implementation
Initialize LlamaIndex Agent with GPT-5 Pro
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: LlamaIndex MCED Diagnostic Utility RAG with GPT-5 Pro
Format
Code-aware
Lines
8
Sections
4
Linked challenge
LlamaIndex MCED Diagnostic Utility RAG with GPT-5 Pro
Prompt source
Original prompt text with formatting preserved for inspection.
8 lines
4 sections
No variables
0 checklist items
from llamaindex.core import VectorStoreIndex, SimpleDirectoryReader, Settings
from llamaindex.llms.openai import OpenAI
Settings.llm = OpenAI(model='gpt-5-pro', temperature=0.0)
# Load clinical guideline document corpus
documents = SimpleDirectoryReader('./mced_guidelines').load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine(similarity_top_k=3)
# Implement query function for MCED report analysisAdaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.