Back to Prompt Library
implementation
Build LlamaIndex Vector Query Engine with Gemini 2.5 Flash
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: MAS Regulatory Intelligence & Asset Screening Agent with LlamaIndex
Format
Code-aware
Lines
8
Sections
3
Linked challenge
MAS Regulatory Intelligence & Asset Screening Agent with LlamaIndex
Prompt source
Original prompt text with formatting preserved for inspection.
8 lines
3 sections
No variables
0 checklist items
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
from llama_index.llms.gemini import Gemini
from llama_index.embeddings.gemini import GeminiEmbedding
Settings.llm = Gemini(model="models/gemini-2.5-flash")
Settings.embed_model = GeminiEmbedding(model_name="models/text-embedding-004")
documents = SimpleDirectoryReader("./mas_docs").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine(similarity_top_k=5)
Adaptation 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.