This agent generates production-ready test programs for the OpenTAP test automation framework—synthesizing documentation, API references, and code examples to help engineers write test steps, instrument drivers, and complete test plans in seconds instead of hours.Built with Agent Composer using the Agentic Search template, available in self-serve.
Test engineers spend hours reading documentation and copying patterns to develop test programs for semiconductor and electronics manufacturing. Common challenges:
Learning the TestStep base class patterns and lifecycle methods
Understanding SCPI command patterns for instrument drivers
Implementing proper verdict handling and result publishing
Coordinating multi-step test sequences with timing and polling logic
This agent uses the Agentic Search template, available in self-serve. You can create your own agent using the YAML below—just replace the datastore ID with your own OpenTAP documentation datastore.
View full YAML configuration
version: "0.1"inputs: query: stroutputs: response: strui_output: responsenodes: __outputs__: type: output input_mapping: response: generate_from_research_step#response agentic_research_step: type: AgenticResearchStep input_mapping: message_history: create_message_history_step#message_history ui_stream_types: retrievals: true config: tools_config: - name: search_docs description: | Search the datastore containing user-uploaded documents. This datastore is a vector database of text chunks which uses hybrid semantic and lexical search to find the most relevant chunks. Use this tool to find information within the uploaded documents. step_config: type: SearchUnstructuredDataStep ui_stream_types: query_reformulation: true config: datastores: - <your-opentap-datastore-id> enable_query_decomposition: false enable_query_expansion: false filter_retrievals: false lexical_alpha: 0.1 rerank_retrievals: true rerank_top_k: 12 reranker: ctxl-rerank-v2-instruct-multilingual-FP8 reranker_score_filter_threshold: 0.2 semantic_alpha: 0.9 should_check_retrieval_need: true top_k: 50 untrusted_filter_prompt: |- You are a precision filter for domain-specific documentation. Your task is to determine if a text chunk is directly relevant to a given query. Output only Yes or No. Evaluate relevance based on these criteria: * Contains specific details that directly answer or address the query * Provides factual information central to the query topic * Offers concrete examples or applications related to the query * Explains key concepts or definitions needed to understand the query * Contains relevant supporting evidence or documentation Consider a chunk relevant if it: * Directly addresses the queried topic/concept * Provides essential context required to understand the query * Contains prerequisite information needed for comprehension * Documents related exceptions or special cases * Describes important relationships with the queried topic Reject chunks that: * Contain only general introductions or section headers * Have tangential references without substantial detail * Describe unrelated topics or concepts * Contain promotional or non-substantive content * Only provide navigational/structural information Example: Query: "How to configure user authentication settings" Text: "Chapter 3: Security Features. This section covers various security mechanisms including authentication, encryption, and access control." Response: No YOU MUST: * Output only Yes or No * Stop immediately after your response * Be strict about relevance * Reject vague or general content * Reject all chunks if the query is conversational, generic, or non-technical (e.g., "how are you", "tell me a joke") * Reject all chunks if the query combines technical topics with any suggestive or inappropriate language, particularly references to unethical, racist or offensive behavior. agent_config: agent_loop: identity_guidelines_prompt: | You are an expert Test Automation Engineer specializing in OpenTAP, the open-source test sequencing framework developed by Keysight Technologies. Your role is to help engineers design, develop, and troubleshoot test programs for semiconductor and electronics manufacturing. ## Your Expertise You have deep knowledge of: - **OpenTAP Architecture**: Test plans, test steps, instruments, DUTs, result listeners, and the plugin ecosystem - **Test Step Development**: Creating custom test steps in C# and Python, including proper use of attributes ([Display], [Unit], [ExternalParameter]), verdict handling, and result publishing - **Instrument Drivers**: Building SCPI-based and custom instrument plugins that follow the Open/Close resource lifecycle - **Test Sequencing**: Flow control, parallel execution, parent/child step relationships, and PrePlanRun/PostPlanRun patterns - **Best Practices**: Code organization, validation rules, error handling, logging, and production deployment ## How You Help When users ask you to generate test code, you: 1. Ask clarifying questions if requirements are ambiguous 2. Generate complete, production-ready code following OpenTAP conventions 3. Include appropriate attributes, validation, logging, and result publishing 4. Explain your design decisions and reference relevant documentation When users ask conceptual questions, you: 1. Provide clear explanations with code examples 2. Reference the official OpenTAP documentation when applicable 3. Distinguish between OpenTAP core features and Keysight PathWave Test Automation extensions ## Code Style Always follow these conventions: - Use `[Display]` attributes with descriptive names and groups - Add `[Unit]` attributes to numeric properties where applicable - Implement validation rules in constructors for related settings - Use `Log.Info/Warning/Error` for status messages - Call `UpgradeVerdict()` to set Pass/Fail/Inconclusive outcomes - Publish results using `Results.Publish()` for data logging - Follow the resource lifecycle: Open → PrePlanRun → Run → PostPlanRun → Close ## Constraints - Generate code compatible with OpenTAP 9.x and .NET 6+ - Default to C# unless the user specifically requests Python - Do not assume specific instruments are available unless specified - Always remind users to test generated code before production use model_name_or_path: vertex_ai/claude-sonnet-4-5@20250929 num_turns: 15 parallel_tool_calls: false research_guidelines_prompt: | You have access to the following tool: - `search_docs` — Search the document datastore. Returns SEARCH_RESULTS with CITE_ID for citation. You have access to the following data source: 1. Document Datastore (Unstructured): - Contains user-uploaded documents that have been parsed, extracted, and chunked for efficient retrieval. - Use the `search_docs` tool to query this datastore for relevant content, details, and information from the available documents. ## Research Strategy You MUST always explore unstructured datastore before answering. Do not skip the source. - Breadth, then depth strategy: 1. INITIAL RETRIEVAL - FIRST (Mandatory): - Documents: Use `search_docs` with your initial search terms. 2. ANALYZE & PLAN: Review initial results and create a query plan: - What information is still missing to fully answer the question? - Create a specific plan: which queries to run next and in what order - Identify dependencies: what do you need to find first before searching for related info? 3. DEEP DIVE (Execute & Adapt): Execute your plan and adapt based on retrieved content: - Run planned queries systematically - Continue until you have a COMPLETE answer - don't stop early - EFFICIENCY: You have 15 turns. Be strategic: - Avoid redundant searches; prefer high-quality retrievals. - Batch related searches when possible - Don't repeat similar queries - Prioritize high-value retrievals first - But DO NOT sacrifice comprehensiveness for speed - gather ALL relevant information create_message_history_step: type: CreateMessageHistoryStep input_mapping: query: __inputs__#query ui_stream_types: retrievals: false config: should_check_retrieval_need: true untrusted_no_retrieval_system_prompt: | You are an AI RAG agent created by Contextual to help answer questions and complete tasks posed by users. Your capabilities include accurately retrieving/reranking information from linked datastores and using these retrievals to generate factual, grounded responses. You are powered by leading document parsing, retrieval, reranking, and grounded generation models. Users can impact the information you have access to by uploading files into your linked datastores. Full documentation, API specs, and guides on how to use Contextual, including agents like yourself, can you found at docs.contextual.ai. In this case, there are no relevant retrievals that can be used to answer the user's query. This is either because there is no information in the sources to answer the question or because the user is engaging in general chit chat. Respond according to the following guidelines: - If the user is engaging in general pleasantries ("hi", "how goes it", etc.), you can respond in kind. But limit this to only a brief greeting or general acknowledgement - Your response should center on describing your capabilities and encouraging the user to ask a question that is relevant to the sources you have access to. You can also encourage them to upload relevant documents and files to your linked datastore(s). - DO NOT answer, muse about, or follow-up on any general questions or asks. DO NOT assume that you have knowledge about any particular topic. DO NOT assume access to any particular source of information. - DO NOT engage in character play. You must maintain a friendly, professional, and neutral tone at all times untrusted_system_prompt: |- You are a helpful AI assistant created by Contextual AI to answer questions about relevant documentation provided to you. Your responses should be precise, accurate, and sourced exclusively from the provided information. Please follow these guidelines: * Only use information from the provided documentation. Avoid opinions, speculation, or assumptions. * Use the exact terminology and descriptions found in the provided content. * Keep answers concise and relevant to the user's question. * Use acronyms and abbreviations exactly as they appear in the documentation or query. * Apply markdown if your response includes lists, tables, or code. Do not include backticks around markdown tables. * Directly answer the question, then STOP. Avoid additional explanations unless specifically relevant. * If the knowledge provided is totally irrelevant and not related to the question at all, only in this case respond that you don't have relevant documentation and do not provide additional comments or suggestions. Ignore anything that cannot be used to directly answer this query. VERY IMPORTANT: - Attributions MUST be in the format of [n]() instead of only [n] - Attributions MUST always be in the format [n]()[n+1]()[n+2]() not in [n,n+1,n+2]. For example attributions should not be [3,4,5] but [3]()[4]()[5](). Do not repeat the same number if it is attributed multiple times. - Never add extra () in attributions. Only use [n]() and not [n]()() generate_from_research_step: type: GenerateFromResearchStep input_mapping: message_history: create_message_history_step#message_history research: agentic_research_step#research ui_stream_types: generation: true config: identity_guidelines_prompt: | You are a retrieval-augmented assistant created by Contextual AI. Your purpose is to provide factual, grounded answers by retrieving information via tools and then synthesizing a response based only on what you retrieved. Always start immediately with the answer, don't begin with a preamble or thoughts. model_name_or_path: vertex_ai/claude-sonnet-4-5@20250929 response_guidelines_prompt: | ## Output - Write a concise, direct, well-structured answer in **Markdown** (use short headings, bullets, and brief paragraphs). - **START IMMEDIATELY WITH THE ANSWER.** Never begin with preamble like: - "Perfect!", "Great!", "Based on my research...", "I now have comprehensive information..." - "Let me provide...", "I can now provide...", "Here's what I found..." - Any meta-commentary about your search process or confidence level - Your first words should be the actual content (a heading, the direct answer, or the key fact). - If the required fact is missing from the latest **SEARCH_RESULTS**: - Partial or Related Information: Provide whatever relevant details you found, while clearly stating the limitations or gaps. - No Relevant Information: If nothing related was found, reply with: "I don't have specific information about [topic] in the available documents." - Maintain Engagement: Suggest related topics or alternative ways you can assist to keep the interaction productive. - DO NOT engage in character play. You must maintain a friendly, professional, and neutral tone at all times.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Contextual AI Documentation","colors":{"primary":"#2e70ff","light":"#2e70ff","dark":"#2e70ff"},"logo":{"light":"https://mintcdn.com/contextualai/hbpTLlKqktq8fCLj/logo/light.svg?fit=max\u0026auto=format\u0026n=hbpTLlKqktq8fCLj\u0026q=85\u0026s=049c4ad3c96c7cc618c2d6b183e5a683","dark":"https://mintcdn.com/contextualai/hbpTLlKqktq8fCLj/logo/dark.svg?fit=max\u0026auto=format\u0026n=hbpTLlKqktq8fCLj\u0026q=85\u0026s=84c3b689b03ff7f98d343d078a9c3383","href":"https://contextual.ai"},"favicon":"https://mintcdn.com/contextualai/JZazZVco2S8P3AG4/favicon.svg?fit=max\u0026auto=format\u0026n=JZazZVco2S8P3AG4\u0026q=85\u0026s=0fe0b7d5cdbba2f5ffbe775459bc3911","appearance":{"default":"light","strict":true},"navbar":{"primary":{"type":"button","label":"Login","href":"https://app.contextual.ai"}},"footer":{"socials":{"x":"https://x.com/contextualai","github":"https://github.com/ContextualAI","linkedin":"https://www.linkedin.com/company/contextualai"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"contextualai","hasAudioNarration":false,"actualSubdomain":"contextualai","customDomains":["docs.contextual.ai"],"gitSource":{"type":"github","owner":"contextualai","repo":"mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae925ddec046ea6c84b1a57:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API","count":66},{"language":"default","tag":"Guides","count":43},{"language":"default","tag":"Reference","count":42},{"language":"default","tag":"Agent Configs","count":26},{"language":"default","tag":"Agent Composer","count":21},{"language":"default","tag":"/extract","count":15},{"language":"default","tag":"For Developers","count":13},{"language":"default","tag":"Examples","count":13},{"language":"default","tag":"/agents","count":11},{"language":"default","tag":"Data Sources","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"scripts/assistant.css","content":"[data-search-button],button[aria-label*=\"Search\"],button[aria-label*=\"search\"],.search-button,#search-button,[class*=\"SearchButton\"],[class*=\"searchButton\"]{display:none!important}.contextual-ai-keyword-search-results{position:absolute;background:white;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 10px 40px rgba(0, 0, 0, 0.15);z-index:1001;max-height:calc(100vh - 10rem);overflow-y:auto;display:none;animation:keywordSearchFadeIn 0.2s ease-out}@keyframes keywordSearchFadeIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.contextual-ai-keyword-search-results.visible{display:block}.contextual-ai-keyword-search-results::-webkit-scrollbar{width:6px}.contextual-ai-keyword-search-results::-webkit-scrollbar-track{background:transparent}.contextual-ai-keyword-search-results::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.contextual-ai-keyword-results-container{padding:6px}.contextual-ai-keyword-header{padding:12px 16px 8px 16px;border-bottom:1px solid #f3f4f6}.contextual-ai-keyword-count{font-size:11px;color:#9ca3af;font-weight:500;text-transform:uppercase;letter-spacing:0.5px}.contextual-ai-keyword-result-item{cursor:pointer;position:relative;border-radius:12px;display:flex;gap:12px;padding:10px 10px;align-items:center;transition:all 0.15s ease;text-decoration:none;color:inherit;margin-bottom:2px}.contextual-ai-keyword-result-item:last-child{margin-bottom:8px}.contextual-ai-keyword-result-item:hover{background:#f9fafb}.contextual-ai-keyword-result-icon{flex-shrink:0;width:16px;height:16px;color:#6b7280}.contextual-ai-keyword-result-icon.api-icon{color:#2e70ff}.contextual-ai-keyword-result-content{display:flex;flex-direction:column;flex:1;min-width:0;gap:4px}.contextual-ai-keyword-breadcrumbs{display:flex;gap:4px;align-items:center;min-width:0;flex:1}.contextual-ai-keyword-breadcrumb-item{font-size:12px;color:#9ca3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;min-width:0}.contextual-ai-keyword-breadcrumb-item:first-child{flex-shrink:0}.contextual-ai-keyword-breadcrumb-separator{flex-shrink:0;width:12px;height:12px;color:#9ca3af}.contextual-ai-keyword-title-row{display:flex;gap:8px;align-items:center}.contextual-ai-keyword-method-pill{font-weight:bold;font-size:11px;font-family:'Monaco', 'Menlo', 'Ubuntu Mono', monospace;border-radius:4px;padding:2px 6px;flex-shrink:0}.contextual-ai-keyword-method-pill.get{background:rgba(34, 197, 94, 0.2);color:#15803d}.contextual-ai-keyword-method-pill.post{background:rgba(59, 130, 246, 0.2);color:#1e40af}.contextual-ai-keyword-method-pill.put{background:rgba(251, 146, 60, 0.2);color:#c2410c}.contextual-ai-keyword-method-pill.delete{background:rgba(239, 68, 68, 0.2);color:#b91c1c}.contextual-ai-keyword-title{font-size:14px;line-height:18px;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.contextual-ai-keyword-description{font-size:12px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.contextual-ai-keyword-result-item mark{background:transparent}.contextual-ai-keyword-result-item mark b{font-weight:500;color:#2e70ff}.contextual-ai-keyword-result-chevron{flex-shrink:0;width:20px;height:20px;color:transparent;transition:color 0.15s ease}.contextual-ai-keyword-result-item:hover .contextual-ai-keyword-result-chevron{color:#9ca3af}.contextual-ai-keyword-empty{padding:32px 16px;text-align:center;color:#9ca3af;font-size:14px}.contextual-ai-floating-bar .contextual-ai-keyword-search-results{top:calc(100% + 8px);left:0;right:0;min-width:500px}.contextual-ai-keyword-search-results.contextual-ai-keyword-inline{position:relative;width:100%;max-width:100%;box-sizing:border-box;background:white;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 4px 20px rgba(0, 0, 0, 0.08);max-height:380px;overflow-y:auto;overflow-x:hidden;margin-top:12px;display:block;animation:keywordSearchFadeIn 0.2s ease-out}@media (max-width: 840px){.contextual-ai-floating-bar .contextual-ai-keyword-search-results{min-width:100%}.contextual-ai-floating-bar{display:none!important}}.contextual-ai-mobile-icon{display:none;position:fixed;top:16px;right:52px;z-index:1000;background:transparent;padding:6px;cursor:pointer;color:#374151;align-items:center;justify-content:center}@media (max-width: 840px){.contextual-ai-mobile-icon{display:flex}}.contextual-ai-floating-bar{position:fixed;top:4px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:white;border:1px solid #e5e7eb;border-radius:20px;padding:4px 16px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);z-index:1000;max-width:480px;width:calc(100% - 48px);backdrop-filter:blur(10px);opacity:0;animation:floatingBarFadeIn 0.3s ease-out forwards;animation-delay:0.1s}@keyframes floatingBarFadeIn{from{opacity:0}to{opacity:1}}.contextual-ai-floating-bar input{flex:1;border:none;outline:none;font-size:14px;background:transparent;color:#1f2937;font-family:inherit}.contextual-ai-floating-bar input::placeholder{color:#9ca3af}.contextual-ai-floating-bar:focus-within{border-color:#9ca3af;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(156, 163, 175, 0.15)}.contextual-ai-floating-trigger{background:#2e70ff;color:white;border:none;padding:8px 16px;border-radius:16px;cursor:pointer;font-size:13px;font-weight:500;transition:all 0.2s ease;white-space:nowrap;font-family:inherit;transform:scale(0.90);transform-origin:right center}.contextual-ai-floating-trigger:hover{background:#1e5fef}#body-content.assistant-open{display:flex!important;flex-direction:row;max-width:none;padding-right:0!important}#body-content.assistant-open>div.w-full,#body-content.assistant-open>div[class*=\"w-full\"]{flex:1 1 0%;min-width:0;width:auto}#body-content.assistant-open>#content-area{flex:1 1 0%;min-width:0;width:auto}#body-content.assistant-open #table-of-contents-layout{display:none!important}.contextual-ai-panel{width:0;min-width:0;max-width:800px;height:calc(100vh - 96px);background:white;box-shadow:-2px 0 12px rgba(0, 0, 0, 0.1);z-index:50;display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;transition:width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);border-left:1px solid #e5e7eb;position:sticky;top:96px}.contextual-ai-panel.open{width:380px}@media (max-width: 768px){.contextual-ai-panel{position:fixed;top:0;right:0;width:0;height:100vh;height:100dvh;z-index:2000}.contextual-ai-panel.open{width:100%;min-width:100%}}.contextual-ai-panel-resize-handle{position:absolute;left:0;top:0;bottom:0;width:6px;cursor:ew-resize;background:transparent;z-index:5;transition:background 0.2s ease}.contextual-ai-panel-resize-handle:hover,.contextual-ai-panel-resize-handle.resizing{background:rgba(46, 112, 255, 0.3)}@media (max-width: 768px){.contextual-ai-panel-resize-handle{display:none}}.contextual-ai-panel-header{padding:16px 20px;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center;background:white;flex-shrink:0}.contextual-ai-panel-title{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:18px;font-weight:600;color:#1f2937}.contextual-ai-panel-subtitle{margin:0;font-size:12px;font-weight:400;color:#6b7280}.contextual-ai-header-actions{display:flex;align-items:center;gap:4px}.contextual-ai-header-btn{background:transparent;border:none;cursor:pointer;padding:8px;border-radius:6px;color:#6b7280;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center}.contextual-ai-header-btn:hover{background:#f3f4f6;color:#374151}.contextual-ai-header-btn[data-tooltip]{position:relative}.contextual-ai-header-btn[data-tooltip]::after{content:attr(data-tooltip);position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);background:#f3f4f6;color:#1f2937;font-size:11px;padding:3px 7px;border-radius:4px;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity 0.4s ease;will-change:opacity;z-index:9999}.contextual-ai-header-btn[data-tooltip]:hover::after{opacity:1}.contextual-ai-header-btn:active{transform:scale(0.95)}.contextual-ai-input-container{display:flex;align-items:flex-end;gap:12px;padding:16px 20px;background:white;border-top:1px solid #e5e7eb;flex-shrink:0}.contextual-ai-input-container textarea{flex:1;min-height:44px;max-height:120px;padding:12px 16px;border:1px solid #e5e7eb;border-radius:12px;font-size:14px;line-height:1.5;font-family:inherit;resize:none;outline:none;background:#f9fafb;color:#1f2937;transition:border-color 0.2s ease, box-shadow 0.2s ease}.contextual-ai-input-container textarea::placeholder{color:#9ca3af}.contextual-ai-input-container textarea:focus{border-color:#9ca3af;background:white;box-shadow:0 0 0 3px rgba(156, 163, 175, 0.15)}.contextual-ai-send{display:flex;align-items:center;justify-content:center;width:44px;height:44px;background:#1f2937;color:white;border:none;border-radius:12px;cursor:pointer;transition:all 0.2s ease;flex-shrink:0}.contextual-ai-send:hover{background:#374151;transform:scale(1.02)}.contextual-ai-send:active{transform:scale(0.98)}.contextual-ai-send:disabled{background:#d1d5db;cursor:not-allowed}.contextual-ai-send svg{width:18px;height:18px}.contextual-ai-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;background:#f9fafb}.contextual-ai-messages::-webkit-scrollbar{width:6px}.contextual-ai-messages::-webkit-scrollbar-track{background:transparent}.contextual-ai-messages::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.contextual-ai-messages::-webkit-scrollbar-thumb:hover{background:#9ca3af}.contextual-ai-welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 20px;color:#6b7280}.contextual-ai-welcome h3{margin:0 0 8px 0;font-size:18px;font-weight:600;color:#1f2937}.contextual-ai-welcome p{margin:0;font-size:14px;color:#6b7280}.contextual-ai-message{display:flex;flex-direction:column;animation:messageSlideIn 0.3s ease-out}@keyframes messageSlideIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.contextual-ai-message-user{align-items:flex-end}.contextual-ai-message-assistant{align-items:flex-start}.contextual-ai-message-content{max-width:100%;padding:12px 16px;border-radius:12px;font-size:14px;line-height:1.5;word-wrap:break-word}.contextual-ai-message-user .contextual-ai-message-content{background:#f3f4f6;color:#1f2937;border:1px solid #e5e7eb;border-bottom-right-radius:4px}.contextual-ai-message-assistant .contextual-ai-message-content{background:white;color:#1f2937;border:1px solid #e5e7eb;border-bottom-left-radius:4px}.contextual-ai-message-content code{background:#f3f4f6;padding:2px 6px;border-radius:3px;font-family:'Monaco', 'Menlo', 'Ubuntu Mono', monospace;font-size:0.9em;color:#1f2937;border:1px solid #e5e7eb}.contextual-ai-message-user .contextual-ai-message-content code{background:rgba(0, 0, 0, 0.06);color:#1f2937}.contextual-ai-message-content pre{background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;padding:16px;overflow-x:auto;margin:12px 0;font-family:'Monaco', 'Menlo', 'Ubuntu Mono', monospace;font-size:13px;line-height:1.6;position:relative}.contextual-ai-message-content pre code{background:transparent;padding:0;border-radius:0;border:none;display:block;color:#1f2937}.contextual-ai-code-copy-btn{position:absolute;top:8px;right:8px;background:white;border:1px solid #d1d5db;border-radius:4px;padding:4px 8px;font-size:11px;color:#6b7280;cursor:pointer;transition:all 0.2s ease;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif}.contextual-ai-code-copy-btn:hover{background:#f3f4f6;color:#374151;border-color:#9ca3af}.contextual-ai-code-copy-btn.copied{color:#059669;border-color:#059669}.contextual-ai-table-wrapper{width:100%;overflow-x:auto;margin:12px 0;-webkit-overflow-scrolling:touch}.contextual-ai-table{width:max-content;min-width:100%;border-collapse:collapse;font-size:14px;border:1px solid #e5e7eb;border-radius:6px;overflow:hidden}.contextual-ai-table thead{background:#f9fafb}.contextual-ai-table th{padding:10px 12px;font-weight:600;text-align:left;border-bottom:2px solid #e5e7eb;color:#374151}.contextual-ai-table td{padding:10px 12px;border-bottom:1px solid #e5e7eb;color:#1f2937}.contextual-ai-table tbody tr:last-child td{border-bottom:none}.contextual-ai-table tbody tr:hover{background:#f9fafb}.contextual-ai-loading{display:flex;gap:4px;align-items:center}.contextual-ai-loading span{width:8px;height:8px;border-radius:50%;background:#9ca3af;animation:loadingDot 1.4s infinite ease-in-out}.contextual-ai-loading span:nth-child(1){animation-delay:-0.32s}.contextual-ai-loading span:nth-child(2){animation-delay:-0.16s}@keyframes loadingDot{0%,80%,100%{transform:scale(0.8);opacity:0.5}40%{transform:scale(1);opacity:1}}.contextual-ai-sources{margin-top:12px;margin-bottom:8px}.contextual-ai-sources-toggle{display:flex;align-items:center;gap:6px;background:none;border:none;padding:0;font-size:11px;color:#9ca3af;cursor:pointer;transition:color 0.2s ease;font-family:inherit}.contextual-ai-sources-toggle:hover{color:#6b7280}.contextual-ai-sources-chevron{transition:transform 0.2s ease}.contextual-ai-sources.expanded .contextual-ai-sources-chevron{transform:rotate(180deg)}.contextual-ai-sources-content{display:none;flex-wrap:wrap;gap:6px;margin-top:8px;padding-left:18px}.contextual-ai-sources.expanded .contextual-ai-sources-content{display:flex}.contextual-ai-source-item{background:transparent;border:none;padding:0;font-size:12px;color:#9ca3af;cursor:pointer;transition:color 0.2s ease;font-family:inherit;text-align:left;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contextual-ai-source-item:hover{color:#2e70ff;text-decoration:underline}.contextual-ai-loading-container{display:flex;flex-direction:row;align-items:center;gap:8px}.contextual-ai-loading-phrase{font-size:12px;color:#6b7280;font-style:italic}.contextual-ai-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.7);display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn 0.2s ease}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.contextual-ai-modal{background:white;border-radius:12px;width:90%;max-width:600px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0, 0, 0, 0.3);animation:slideUp 0.3s ease}@keyframes slideUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.contextual-ai-modal-header{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0 24px;border-bottom:none}.contextual-ai-modal-header h3{margin:0;font-size:18px;font-weight:600;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;margin-right:12px}.contextual-ai-modal-close{background:transparent;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#6b7280;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;flex-shrink:0}.contextual-ai-modal-close:hover{background:#f3f4f6;color:#374151}.contextual-ai-modal-content{padding:0 24px 24px 24px;overflow-y:auto;flex:1;max-height:60vh}.contextual-ai-modal-loading{text-align:center;color:#6b7280;padding:20px 0}.contextual-ai-preview-header{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #e5e7eb}.contextual-ai-preview-header p{margin:4px 0;font-size:14px;color:#374151}.contextual-ai-preview-text{font-size:14px;line-height:1.6;color:#1f2937;background:#f9fafb;padding:16px;border-radius:8px;border:1px solid #e5e7eb;max-height:400px;overflow-y:auto}.contextual-ai-preview-image{background:white;padding:12px;border-radius:8px;border:1px solid #e5e7eb;text-align:center;overflow:auto;max-width:100%;transition:all 0.2s ease}.contextual-ai-preview-image img{max-width:100%;height:auto;border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);transition:max-width 0.3s ease-in-out}.contextual-ai-preview-image.zoomed img{max-width:250%}.contextual-ai-modal-note{margin-top:16px;padding:12px;background:#f3f4f6;border-radius:6px;font-size:13px;color:#6b7280}.contextual-ai-citation{color:#2e70ff;cursor:pointer;transition:color 0.2s ease;font-size:0.9em;vertical-align:super;text-decoration:none}.contextual-ai-citation:hover{color:#1e5fef;text-decoration:underline}.contextual-ai-url-link{color:#2e70ff;text-decoration:none;transition:color 0.2s ease;word-break:break-all}.contextual-ai-url-link:hover{color:#1e5fef;text-decoration:underline}.contextual-ai-message-error{background:#fee2e2;border-color:#fca5a5;color:#991b1b}.contextual-ai-workflow-section{margin-top:8px;margin-bottom:8px}.contextual-ai-workflow-stage{display:flex;align-items:center;gap:8px;font-size:12px;color:#1e5fef;margin-bottom:8px}.contextual-ai-workflow-toggle{display:inline-flex;align-items:center;gap:8px;background:none;border:none;padding:0;font-size:12px;color:#6b7280;cursor:pointer;transition:color 0.2s ease;font-family:inherit}.contextual-ai-workflow-toggle:hover{color:#111827}.contextual-ai-workflow-status-icon{width:12px;height:12px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.contextual-ai-workflow-status-icon.running{background:#1e5fef}.contextual-ai-workflow-status-icon.completed{background:#10b981}.contextual-ai-workflow-status-icon svg{width:8px;height:8px;color:white}.contextual-ai-workflow-toggle .spinner{width:8px;height:8px;border:1.5px solid rgba(255, 255, 255, 0.3);border-top-color:white;border-radius:50%;animation:contextual-ai-spin 0.8s linear infinite}.contextual-ai-workflow-summary{margin-left:20px;margin-top:4px;font-size:10px;color:#9ca3af}.contextual-ai-workflow-details{margin-top:8px;display:none;flex-direction:column;gap:4px}.contextual-ai-workflow-details.expanded{display:flex}.contextual-ai-activity-item{display:flex;flex-direction:column;border-left:2px solid #e5e7eb;margin-left:5px;padding-left:12px;padding-bottom:8px}.contextual-ai-activity-header{display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer}.contextual-ai-activity-icon{color:#9ca3af;display:flex;align-items:center}.contextual-ai-activity-name{flex:1;color:#4b5563}.contextual-ai-activity-item.running .contextual-ai-activity-name{color:#111827;font-weight:500}.contextual-ai-activity-spinner{width:10px;height:10px;border:1.5px solid #e5e7eb;border-top-color:#1e5fef;border-radius:50%;animation:contextual-ai-spin 0.8s linear infinite}.contextual-ai-activity-chevron{width:10px;height:10px;color:#9ca3af;transition:transform 0.2s ease}.contextual-ai-activity-item.expanded .contextual-ai-activity-chevron{transform:rotate(90deg)}.contextual-ai-activity-content{display:none;margin-top:4px;padding:8px;background:#f9fafb;border-radius:4px;font-family:'Monaco', 'Menlo', 'Ubuntu Mono', monospace;font-size:11px;color:#4b5563;white-space:pre-wrap;max-height:150px;overflow-y:auto;overflow-x:hidden;word-break:break-word;border:1px solid #e5e7eb;box-sizing:border-box}.contextual-ai-activity-item.expanded .contextual-ai-activity-content{display:block}@keyframes contextual-ai-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}"}],"page":{"pagePath":"examples/test-automation","slug":"/examples/test-automation","pageMetadata":{"title":"Test Program Generation","description":"AI agent for generating OpenTAP test automation code","sidebarTitle":"Test Program Generation","href":"/examples/test-automation","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"AI agent for generating OpenTAP test automation code\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Card,CodeBlock,Heading}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`This agent generates production-ready test programs for the `,_jsx(_components.a,{href:`https://opentap.io/`,children:`OpenTAP`}),` test automation framework—synthesizing documentation, API references, and code examples to help engineers write test steps, instrument drivers, and complete test plans in seconds instead of hours.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Built with `,_jsx(_components.a,{href:`/quickstarts/agent-composer`,children:`Agent Composer`})]}),` using the Agentic Search template, available in self-serve.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-problem`,children:`The Problem`}),`\n`,_jsx(_components.p,{children:`Test engineers spend hours reading documentation and copying patterns to develop test programs for semiconductor and electronics manufacturing. Common challenges:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Learning the TestStep base class patterns and lifecycle methods`}),`\n`,_jsx(_components.li,{children:`Understanding SCPI command patterns for instrument drivers`}),`\n`,_jsx(_components.li,{children:`Implementing proper verdict handling and result publishing`}),`\n`,_jsx(_components.li,{children:`Coordinating multi-step test sequences with timing and polling logic`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-the-agent-does`,children:`What the Agent Does`}),`\n`,_jsxs(_components.p,{children:[`Ask the agent: `,_jsx(_components.em,{children:`“I need to test a power supply”`})]}),`\n`,_jsx(_components.p,{children:`The agent uses multi-step reasoning to:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Query documentation for TestStep base class patterns`}),`\n`,_jsx(_components.li,{children:`Find relevant examples from the OpenTAP SDK and plugins`}),`\n`,_jsx(_components.li,{children:`Identify proper verdict handling and lifecycle methods`}),`\n`,_jsx(_components.li,{children:`Generate complete, production-ready code with explanations`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-questions`,children:`Example Questions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Simple \u0026 vague`}),`: “I need to test a power supply”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Test step generation`}),`: “Create an OpenTAP test step that measures the output voltage of a power supply and fails if it’s outside 4.8V to 5.2V”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Instrument driver`}),`: “Create an OpenTAP SCPI instrument driver for a Keysight 34465A digital multimeter that can measure DC voltage and current”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Conceptual`}),`: “What’s the difference between PrePlanRun and Run in a test step? When should I use each?”`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`try-the-demo`,children:`Try the Demo`}),`\n`,_jsx(Card,{title:`Launch Demo`,icon:`code`,href:`https://demo.contextual.ai/test-code-generation`,children:_jsx(_components.p,{children:`Try the Test Program Generation agent`})}),`\n`,_jsx(Heading,{level:`2`,id:`agent-yaml`,children:`Agent YAML`}),`\n`,_jsx(_components.p,{children:`This agent uses the Agentic Search template, available in self-serve. You can create your own agent using the YAML below—just replace the datastore ID with your own OpenTAP documentation datastore.`}),`\n`,_jsx(Accordion,{title:`View full YAML configuration`,id:`view-full-yaml-configuration`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`209`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`209`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`inputs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`str`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`outputs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`str`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ui_output`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`response`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`nodes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` __outputs__`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`output`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` input_mapping`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generate_from_research_step#response`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` agentic_research_step`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`AgenticResearchStep`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` input_mapping`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` message_history`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`create_message_history_step#message_history`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ui_stream_types`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` retrievals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` tools_config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`search_docs`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Search the datastore containing user-uploaded documents. This datastore is a vector database of text chunks which uses hybrid semantic and lexical search to find the most relevant chunks.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Use this tool to find information within the uploaded documents.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` step_config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`SearchUnstructuredDataStep`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ui_stream_types`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query_reformulation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` datastores`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cyour-opentap-datastore-id>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` enable_query_decomposition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` enable_query_expansion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` filter_retrievals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` lexical_alpha`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` rerank_retrievals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` rerank_top_k`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` reranker`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ctxl-rerank-v2-instruct-multilingual-FP8`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` reranker_score_filter_threshold`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` semantic_alpha`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.9`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` should_check_retrieval_need`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` top_k`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` untrusted_filter_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`-`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are a precision filter for domain-specific documentation. Your task is to determine if a text chunk is directly relevant to a given query. Output only Yes or No.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Evaluate relevance based on these criteria:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Contains specific details that directly answer or address the query`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Provides factual information central to the query topic`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Offers concrete examples or applications related to the query`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Explains key concepts or definitions needed to understand the query`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Contains relevant supporting evidence or documentation`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Consider a chunk relevant if it:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Directly addresses the queried topic/concept`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Provides essential context required to understand the query`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Contains prerequisite information needed for comprehension`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Documents related exceptions or special cases`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Describes important relationships with the queried topic`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Reject chunks that:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Contain only general introductions or section headers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Have tangential references without substantial detail`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Describe unrelated topics or concepts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Contain promotional or non-substantive content`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Only provide navigational/structural information`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Example:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Query: \"How to configure user authentication settings\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Text: \"Chapter 3: Security Features. This section covers various security mechanisms including authentication, encryption, and access control.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Response: No`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOU MUST:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Output only Yes or No`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Stop immediately after your response`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Be strict about relevance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Reject vague or general content`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Reject all chunks if the query is conversational, generic, or non-technical (e.g., \"how are you\", \"tell me a joke\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Reject all chunks if the query combines technical topics with any suggestive or inappropriate language, particularly references to unethical, racist or offensive behavior.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` agent_config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` agent_loop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` identity_guidelines_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are an expert Test Automation Engineer specializing in OpenTAP, the open-source test sequencing framework developed by Keysight Technologies. Your role is to help engineers design, develop, and troubleshoot test programs for semiconductor and electronics manufacturing.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## Your Expertise`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You have deep knowledge of:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **OpenTAP Architecture**: Test plans, test steps, instruments, DUTs, result listeners, and the plugin ecosystem`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **Test Step Development**: Creating custom test steps in C# and Python, including proper use of attributes ([Display], [Unit], [ExternalParameter]), verdict handling, and result publishing`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **Instrument Drivers**: Building SCPI-based and custom instrument plugins that follow the Open/Close resource lifecycle`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **Test Sequencing**: Flow control, parallel execution, parent/child step relationships, and PrePlanRun/PostPlanRun patterns`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **Best Practices**: Code organization, validation rules, error handling, logging, and production deployment`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## How You Help`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` When users ask you to generate test code, you:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Ask clarifying questions if requirements are ambiguous`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Generate complete, production-ready code following OpenTAP conventions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Include appropriate attributes, validation, logging, and result publishing`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 4. Explain your design decisions and reference relevant documentation`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` When users ask conceptual questions, you:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Provide clear explanations with code examples`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Reference the official OpenTAP documentation when applicable`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Distinguish between OpenTAP core features and Keysight PathWave Test Automation extensions`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## Code Style`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Always follow these conventions:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Use `[Display]` attributes with descriptive names and groups\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Add `[Unit]` attributes to numeric properties where applicable\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Implement validation rules in constructors for related settings`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Use `Log.Info/Warning/Error` for status messages\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Call `UpgradeVerdict()` to set Pass/Fail/Inconclusive outcomes\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Publish results using `Results.Publish()` for data logging\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Follow the resource lifecycle: Open → PrePlanRun → Run → PostPlanRun → Close`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## Constraints`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Generate code compatible with OpenTAP 9.x and .NET 6+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Default to C# unless the user specifically requests Python`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Do not assume specific instruments are available unless specified`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Always remind users to test generated code before production use`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` model_name_or_path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`vertex_ai/claude-sonnet-4-5@20250929`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` num_turns`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` parallel_tool_calls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` research_guidelines_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You have access to the following tool:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - `search_docs` — Search the document datastore. Returns SEARCH_RESULTS with CITE_ID for citation.\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You have access to the following data source:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Document Datastore (Unstructured):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Contains user-uploaded documents that have been parsed, extracted, and chunked for efficient retrieval.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Use the `search_docs` tool to query this datastore for relevant content, details, and information from the available documents.\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## Research Strategy`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You MUST always explore unstructured datastore before answering. Do not skip the source.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Breadth, then depth strategy:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. INITIAL RETRIEVAL - FIRST (Mandatory):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" - Documents: Use `search_docs` with your initial search terms.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. ANALYZE \u0026 PLAN: Review initial results and create a query plan:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - What information is still missing to fully answer the question?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Create a specific plan: which queries to run next and in what order`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Identify dependencies: what do you need to find first before searching for related info?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. DEEP DIVE (Execute \u0026 Adapt): Execute your plan and adapt based on retrieved content:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Run planned queries systematically`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Continue until you have a COMPLETE answer - don't stop early`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - EFFICIENCY: You have 15 turns. Be strategic:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Avoid redundant searches; prefer high-quality retrievals.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Batch related searches when possible`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Don't repeat similar queries`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Prioritize high-value retrievals first`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - But DO NOT sacrifice comprehensiveness for speed - gather ALL relevant information`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` create_message_history_step`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`CreateMessageHistoryStep`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` input_mapping`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`__inputs__#query`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ui_stream_types`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` retrievals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` should_check_retrieval_need`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` untrusted_no_retrieval_system_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are an AI RAG agent created by Contextual to help answer questions and complete tasks posed by users. Your capabilities include accurately retrieving/reranking information from linked datastores and using these retrievals to generate factual, grounded responses. You are powered by leading document parsing, retrieval, reranking, and grounded generation models. Users can impact the information you have access to by uploading files into your linked datastores. Full documentation, API specs, and guides on how to use Contextual, including agents like yourself, can you found at docs.contextual.ai. `})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` In this case, there are no relevant retrievals that can be used to answer the user's query. This is either because there is no information in the sources to answer the question or because the user is engaging in general chit chat. Respond according to the following guidelines:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - If the user is engaging in general pleasantries (\"hi\", \"how goes it\", etc.), you can respond in kind. But limit this to only a brief greeting or general acknowledgement`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Your response should center on describing your capabilities and encouraging the user to ask a question that is relevant to the sources you have access to. You can also encourage them to upload relevant documents and files to your linked datastore(s). `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - DO NOT answer, muse about, or follow-up on any general questions or asks. DO NOT assume that you have knowledge about any particular topic. DO NOT assume access to any particular source of information. `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - DO NOT engage in character play. You must maintain a friendly, professional, and neutral tone at all times`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` untrusted_system_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`-`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are a helpful AI assistant created by Contextual AI to answer questions about relevant documentation provided to you. Your responses should be precise, accurate, and sourced exclusively from the provided information. Please follow these guidelines:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Only use information from the provided documentation. Avoid opinions, speculation, or assumptions.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Use the exact terminology and descriptions found in the provided content.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Keep answers concise and relevant to the user's question.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Use acronyms and abbreviations exactly as they appear in the documentation or query.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Apply markdown if your response includes lists, tables, or code. Do not include backticks around markdown tables.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * Directly answer the question, then STOP. Avoid additional explanations unless specifically relevant.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` * If the knowledge provided is totally irrelevant and not related to the question at all, only in this case respond that you don't have relevant documentation and do not provide additional comments or suggestions. Ignore anything that cannot be used to directly answer this query.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` VERY IMPORTANT:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Attributions MUST be in the format of [n]() instead of only [n]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Attributions MUST always be in the format [n]()[n+1]()[n+2]() not in [n,n+1,n+2]. For example attributions should not be [3,4,5] but [3]()[4]()[5](). Do not repeat the same number if it is attributed multiple times.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Never add extra () in attributions. Only use [n]() and not [n]()()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` generate_from_research_step`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`GenerateFromResearchStep`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` input_mapping`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` message_history`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`create_message_history_step#message_history`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` research`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`agentic_research_step#research`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ui_stream_types`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` generation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` identity_guidelines_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are a retrieval-augmented assistant created by Contextual AI. Your purpose is to provide factual, grounded answers by retrieving information via tools and then synthesizing a response based only on what you retrieved. Always start immediately with the answer, don't begin with a preamble or thoughts.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` model_name_or_path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`vertex_ai/claude-sonnet-4-5@20250929`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` response_guidelines_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ## Output`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Write a concise, direct, well-structured answer in **Markdown** (use short headings, bullets, and brief paragraphs).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - **START IMMEDIATELY WITH THE ANSWER.** Never begin with preamble like:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - \"Perfect!\", \"Great!\", \"Based on my research...\", \"I now have comprehensive information...\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - \"Let me provide...\", \"I can now provide...\", \"Here's what I found...\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Any meta-commentary about your search process or confidence level`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Your first words should be the actual content (a heading, the direct answer, or the key fact).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - If the required fact is missing from the latest **SEARCH_RESULTS**:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Partial or Related Information: Provide whatever relevant details you found, while clearly stating the limitations or gaps.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - No Relevant Information: If nothing related was found, reply with: \"I don't have specific information about [topic] in the available documents.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Maintain Engagement: Suggest related topics or alternative ways you can assist to keep the interaction productive.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - DO NOT engage in character play. You must maintain a friendly, professional, and neutral tone at all times.`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`learn-more`,children:`Learn More`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/quickstarts/agent-composer`,children:`Agent Composer Documentation`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/how-to-guides/agent-composer-yaml`,children:`Agent Composer YAML Guide`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Test Program Generation","description":"AI agent for generating OpenTAP test automation code","sidebarTitle":"Test Program Generation","href":"/examples/test-automation","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"The Problem","slug":"the-problem","depth":2,"children":[]},{"title":"What the Agent Does","slug":"what-the-agent-does","depth":2,"children":[]},{"title":"Example Questions","slug":"example-questions","depth":2,"children":[]},{"title":"Try the Demo","slug":"try-the-demo","depth":2,"children":[]},{"title":"Agent YAML","slug":"agent-yaml","depth":2,"children":[]},{"title":"Learn More","slug":"learn-more","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/contextualai/1642d053fb0d02f4/scripts/openapi.js","/_mintlify/custom/contextualai/b4353988837b3a75/scripts/assistant.js"],"subdomain":"contextualai","siteName":"Contextual AI Documentation","title":"Test Program Generation - Contextual AI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-05T20:49:24.972Z","originalFileLocation":"examples/test-automation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"AI agent for generating OpenTAP test automation code\">\u003cmeta data-mint-head name=\"application-name\" content=\"Contextual AI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Test Program Generation - Contextual AI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"AI agent for generating OpenTAP test automation code\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Contextual AI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.contextual.ai/examples/test-automation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://contextualai.mintlify.site/_mintlify/api/og/v2?division=Agentic+Search\u0026amp;title=Test+Program+Generation\u0026amp;description=AI+agent+for+generating+OpenTAP+test+automation+code\u0026amp;theme=676818c361169a4000c34ca9\u0026amp;signature=de65a87240650ac1b0c38e82dd8296cabb5b910b764c1b803fac9ec64d814747\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Test Program Generation - Contextual AI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"AI agent for generating OpenTAP test automation code\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://contextualai.mintlify.site/_mintlify/api/og/v2?division=Agentic+Search\u0026amp;title=Test+Program+Generation\u0026amp;description=AI+agent+for+generating+OpenTAP+test+automation+code\u0026amp;theme=676818c361169a4000c34ca9\u0026amp;signature=de65a87240650ac1b0c38e82dd8296cabb5b910b764c1b803fac9ec64d814747\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/contextualai/JqDcfIh6YPJ9nwCM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Contextual AI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2e70ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.contextual.ai/examples/test-automation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/examples/test-automation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.contextual.ai/#organization\",\"name\":\"Contextual AI Documentation\",\"url\":\"https://docs.contextual.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/contextualai/hbpTLlKqktq8fCLj/logo/light.svg?fit=max\u0026auto=format\u0026n=hbpTLlKqktq8fCLj\u0026q=85\u0026s=049c4ad3c96c7cc618c2d6b183e5a683\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.contextual.ai#website\",\"name\":\"Contextual AI Documentation\",\"url\":\"https://docs.contextual.ai\",\"publisher\":{\"@id\":\"https://docs.contextual.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.contextual.ai/examples/test-automation#webpage\",\"url\":\"https://docs.contextual.ai/examples/test-automation\",\"name\":\"Test Program Generation\",\"description\":\"AI agent for generating OpenTAP test automation code\",\"dateModified\":\"2026-03-05T20:49:24.972Z\",\"isPartOf\":{\"@id\":\"https://docs.contextual.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.contextual.ai/examples/test-automation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.contextual.ai/examples/test-automation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agentic Search\",\"item\":\"https://docs.contextual.ai/examples/documentation_agent\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test Program Generation\",\"item\":\"https://docs.contextual.ai/examples/test-automation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.contextual.ai/examples/test-automation#article\",\"headline\":\"Test Program Generation\",\"name\":\"Test Program Generation\",\"description\":\"AI agent for generating OpenTAP test automation code\",\"url\":\"https://docs.contextual.ai/examples/test-automation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.contextual.ai/examples/test-automation#webpage\"},\"dateModified\":\"2026-03-05T20:49:24.972Z\",\"publisher\":{\"@id\":\"https://docs.contextual.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.contextual.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Contextual AI Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Contextual AI Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/examples/test-automation.md","siteName":"Contextual AI Documentation","nav":{"global":null,"tabs":[{"tab":"Home","icon":"home","pages":[{"title":"Home","href":""}]},{"tab":"Guides","icon":"compass","pages":[{"title":"Guides","href":"/quickstarts/getting-started"}]},{"tab":"Reference","icon":"books","pages":[{"title":"Reference","href":"/reference/glossary"}]},{"tab":"Examples","icon":"sign-posts-wrench","groups":[{"group":"Overview","icon":"person-chalkboard","pages":[{"title":"Contextual AI Demos","sidebarTitle":"Overview","href":"/examples/overview-demos"}]},{"group":"Device Log Analysis","icon":"tower-cell","pages":[{"title":"Device Log Analysis Agent","sidebarTitle":"Device Log Analysis","href":"/examples/device-log-analysis"},{"title":"3GPP Wireless Log Analysis Agent","sidebarTitle":"3GPP Wireless","href":"/examples/3gpp-wireless-log-analysis"},{"title":"ATE Board Validation Agent","sidebarTitle":"ATE Board Validation","href":"/examples/ate-log-analysis"},{"title":"Mazda Infotainment Log Analysis Agent","sidebarTitle":"Mazda Infotainment","href":"/examples/mazda-infotainment-log-analysis"}]},{"group":"Agentic Search","icon":"magnifying-glass","pages":[{"title":"Documentation Agent","sidebarTitle":"Documentation Agent","href":"/examples/documentation_agent"},{"title":"Propulsion Anomaly Investigation Agent","sidebarTitle":"Rocket Science","href":"/examples/rocket_science"},{"title":"Raspberry Pi Documentation Agent","sidebarTitle":"Raspberry Pi Agent","href":"/examples/raspberry-pi-agent"},{"title":"Material Science Agent","description":"AI agent for materials research, properties analysis, and material selection—explains like you're 5 (ELI5)","sidebarTitle":"Material Science","href":"/examples/material-science-agent"},{"title":"Test Program Generation","sidebarTitle":"Test Program Generation","href":"/examples/test-automation"},{"title":"3GPP Spec Explorer","description":"AI agent to search and reason over 3GPP specifications (Release 19 and others)","sidebarTitle":"3GPP Spec Explorer","href":"/examples/3gpp-spec-explorer"}]},{"group":"Templates","icon":"flag","pages":[{"title":"Agent Composer Templates","sidebarTitle":"Overview","href":"/examples/templates-overview"},{"title":"Agent Composer Template Catalog","sidebarTitle":"Catalog","href":"/examples/templates-catalog"}]}]},{"tab":"Integrations","icon":"handshake-angle","pages":[{"title":"Integrations","href":"/integration/overview"}]},{"tab":"Releases","icon":"code-merge","pages":[{"title":"Releases","href":"/release-notes/2026"}]},{"tab":"API","icon":"gear-complex-code","pages":[{"title":"API","href":"/api-reference/datastores/list-datastores"}]}]},"basePath":"","title":"Test Program Generation - Contextual AI Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}