### Example LLM Generated User Interview Guide Source: https://www.adaline.ai/docs/guides/prompt_library/generate_user_research_question This snippet presents an example of an LLM-generated user interview guide based on the provided user prompt for the BudgetWise app. It includes warm-up and behavioral questions tailored for busy working parents, demonstrating the type of output expected from the LLM. ```Text **User Interview Guide** **Target:** Busy Working Parents ## [​](#warm-up-questions-5-minutes) Warm-up Questions (5 minutes) * Tell me about your family and what a typical weekday looks like for you. * How do you and your partner typically handle household decisions? ## [​](#behavioral-questions-15-minutes) Behavioral Questions (15 minutes) * Walk me through the last time you made a significant family purchase. What was your thought process? * How do you currently keep track of your family’s spending? Show me if you use any tools or apps. * Describe a recent situation where you felt stressed about money. What triggered that feeling? * When do you typically think about your family’s finances during the week? ``` -------------------------------- ### Example User Prompt for CloudSync Enterprise Platform Roadmap Source: https://www.adaline.ai/docs/guides/prompt_library/product_strategy_consultant Illustrates a concrete example of the user prompt with specific values for generating a product roadmap for 'CloudSync Enterprise Platform', detailing strategic goals, market trends, resource constraints, timeline, and stakeholder priorities. ```Prompt User Prompt Generate a product roadmap for CloudSync Enterprise Platform with the following parameters: * **Strategic Goals:** Increase enterprise customer retention by 30%, expand into mid-market segment, improve platform scalability * **Market Trends:** Growing demand for AI-powered analytics, increased focus on data privacy compliance, shift toward hybrid cloud solutions * **Resource Constraints:** 12 engineers (6 frontend, 4 backend, 2 DevOps), $500K budget, 9-month timeline * **Timeline:** Q1 2025 - Q3 2025 * **Key Stakeholders:** Sales team needs faster customer onboarding, Engineering wants to reduce technical debt, Marketing requires competitive differentiation ``` -------------------------------- ### Example Adaline.ai Deployment API Response JSON Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment This JSON object provides a comprehensive example of the data returned by the Adaline.ai deployment API. It illustrates the structure of a successful response, including detailed prompt configuration, messages, tools, and variables. ```JSON { "id": "deployment_id", "createdAt": 1704067200000, "updatedAt": 1704067200000, "createdByUserId": "user_id", "updatedByUserId": "user_id", "projectId": "project_id", "promptId": "prompt_id", "deploymentEnvironmentId": "env_id", "prompt": { "config": { "model": "gpt-4o-mini", "providerName": "openai", "providerId": "provider_id", "settings": { "temperature": 0.7, "maxTokens": 1000, "topP": 1, "frequencyPenalty": 0, "presencePenalty": 0 } }, "messages": [ { "role": "system", "content": [ { "modality": "text", "value": "You are a helpful assistant. You answer questions based on a reference image and user input." } ] }, { "role": "user", "content": [ { "modality": "text", "value": "This is the user input\n\n###\n{{user_input}}\n###" }, { "modality": "image", "detail": "auto", "value": { "type": "url", "url": "{{reference_image}}" } } ] } ], "tools": [], "variables": [ { "name": "user_input", "modality": "text" }, { "name": "reference_image", "modality": "image" } ] } } ``` -------------------------------- ### Partial LLM Generated Product Roadmap Example Source: https://www.adaline.ai/docs/guides/prompt_library/product_strategy_consultant Presents a partial example of an AI-generated product roadmap, showcasing the strategic overview with vision and key objectives, and the first quarter's focus on foundation and compliance with specific milestones. ```Text **Product Roadmap (Q1 2025 - Q3 2025 Strategic Plan)** ## [​](#strategic-overview) Strategic Overview **Vision:** Transform CloudSync into the leading hybrid cloud platform for enterprise and mid-market customers through AI-powered analytics and seamless scalability. **Key Objectives:** * 30% improvement in customer retention * Mid-market segment penetration * Enhanced platform performance and compliance ## [​](#quarterly-timeline) Quarterly Timeline ### [​](#q1-2025%3A-foundation-%26-compliance) Q1 2025: Foundation & Compliance **Focus:** Technical debt reduction + GDPR/SOC2 compliance * ✅ Database optimization and performance tuning * ✅ Privacy compliance framework implementation * ✅ API rate limiting and security enhancements * **Milestone:** SOC2 certification achieved ``` -------------------------------- ### Example User Prompt for Project Management SaaS Analysis Source: https://www.adaline.ai/docs/guides/prompt_library/competitive_intelligence_analysis A concrete example demonstrating how to use the user prompt template to analyze the competitive landscape for project management SaaS, including specific news, competitors, current positioning, and strategic concerns. ```Prompt Analyze the competitive landscape for project management SaaS based on the following intelligence: * **News Articles & Announcements:** “Asana launches AI-powered task prioritization… Monday.com acquires time tracking startup TimeSync… Notion introduces collaborative whiteboards… Slack integrates advanced workflow automation… Microsoft Project adds real-time collaboration features” * **Competitor Focus:** Asana, Monday.com, Notion, Slack, Microsoft Project * **Our Product Positioning:** Mid-market project management with strong reporting capabilities * **Strategic Concerns:** AI integration, team collaboration features, enterprise expansion ``` -------------------------------- ### LLM-as-a-Judge Evaluation Rubric Example Source: https://www.adaline.ai/docs/quickstart/quickstart_product_leaders An example of a simple rubric used by the 'LLM as a Judge' evaluator to assess the quality of prompt responses. This specific rubric ensures the output is in English and non-offensive. ```Plaintext The output must be in English and not offensive. ``` -------------------------------- ### Example User Prompt for ShopEasy Mobile App Review Analysis Source: https://www.adaline.ai/docs/guides/prompt_library/customer_review_analysis_template An example of a user prompt filled with specific data for the 'ShopEasy Mobile App', demonstrating how to provide customer review text, define focus areas, and state current product priorities for analysis. ```Prompt Template Analyze the following customer reviews for ShopEasy Mobile App: * **Review Data:** “App crashes when I try to checkout… love the product selection but payment process is confusing… wish there was a wishlist feature… delivery tracking is inaccurate… great deals but search function is terrible… customer service response is slow… app is fast but interface is cluttered… need better filtering options…” * **Focus Areas:** User experience, payment flow, search functionality * **Current Priority:** Improving conversion rates and reducing cart abandonment ``` -------------------------------- ### Retrieve Deployment Details via cURL Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-deployment Example cURL command to perform a GET request to retrieve specific deployment details using a prompt ID and deployment ID, authenticated with an API key. Replace placeholder values with actual API key, prompt ID, and deployment ID. ```cURL # Replace with your values API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ID="my_deployment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentId=${DEPLOYMENT_ID}" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### Example LLM Response: Project Management SaaS Competitive Intelligence Source: https://www.adaline.ai/docs/guides/prompt_library/competitive_intelligence_analysis A sample AI-generated response based on the example user prompt, detailing emerging competitor strengths in the project management SaaS market, optimized for executive strategy meetings. ```Natural Language **Competitive Intelligence: Project Management SaaS Market** ## [​](#emerging-competitor-strengths) Emerging Competitor Strengths * **Asana:** AI-powered task prioritization positions them ahead in automation race * **Monday.com:** TimeSync acquisition strengthens time tracking capabilities, targeting consulting market * **Notion:** Collaborative whiteboards expand beyond docs into visual project planning * **Slack:** Advanced workflow automation threatens standalone project tools * **Microsoft:** Real-time collaboration upgrades challenge market with enterprise integration advantage ``` -------------------------------- ### OpenAI GPT-4.1 Cost Calculation Example Source: https://www.adaline.ai/docs/pillars/evaluate/evaluators/cost This example demonstrates how the Cost evaluator calculates the cost for OpenAI GPT-4.1 based on input and output token pricing. ```Plaintext 1,000 input tokens × $3.00/1M + 500 output tokens × $12.00/1M = $0.009 ``` -------------------------------- ### Example Deployment Response JSON Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-deployment A sample JSON response illustrating the structure and typical values for a deployment object, including nested prompt configuration, messages, tools, and variables, as returned by the API. ```APIDOC { "id": "deployment_id", "createdAt": 1704067200000, "updatedAt": 1704067200000, "createdByUserId": "user_id", "updatedByUserId": "user_id", "projectId": "project_id", "promptId": "prompt_id", "deploymentEnvironmentId": "env_id", "prompt": { "config": { "model": "gpt-4o-mini", "providerName": "openai", "providerId": "provider_id", "settings": { "temperature": 0.7, "maxTokens": 1000, "topP": 1, "frequencyPenalty": 0, "presencePenalty": 0 } }, "messages": [ { "role": "system", "content": [ { "modality": "text", "value": "You are a helpful assistant. You answer questions based on a reference image and user input." } ] }, { "role": "user", "content": [ { "modality": "text", "value": "This is the user input\n\n###\n{{user_input}}\n###" }, { "modality": "image", "detail": "auto", "value": { "type": "url", "url": "{{reference_image}}" } } ] } ], "tools": [], "variables": [ { "name": "user_input", "modality": "text" }, { "name": "reference_image", "modality": "image" } ] } } ``` -------------------------------- ### Example AI-Generated Product Specification for FoodSnap Source: https://www.adaline.ai/docs/guides/prompt_library/dratfing_product_specification This snippet demonstrates the use of the product specification prompt template with a concrete example. It shows a user's specific input for a mobile app called 'FoodSnap' and the resulting AI-generated product specification, detailing an executive summary, target user analysis, feature specifications (AI Ingredient Recognition, Personalized Recipe Engine, Smart Shopping Lists), and technical requirements. ```AI Prompt User Prompt Create a product specification for my mobile app: * **Product Name:** FoodSnap - AI Recipe Generator * **Key Features:** Photo-based ingredient recognition, personalized recipe suggestions, dietary restriction filters, shopping list generation * **Target Users:** Busy professionals aged 25-40 who cook at home but lack inspiration and time for meal planning * **Success Metrics:** 80% user retention after 30 days, average 3 recipes generated per user per week, 4.5+ app store rating LLM Response Product Specification: FoodSnap - AI Recipe Generator ## [​](#executive-summary) Executive Summary FoodSnap is an AI-powered mobile app that transforms ingredient photos into personalized recipe recommendations, targeting busy professionals who want quick, tailored cooking solutions. ## [​](#target-user-analysis) Target User Analysis **Primary Persona:** Busy Professional Cook (Age 25-40) * Goals: Quick meal ideas, use existing ingredients, healthy eating * Pain Points: Lack of cooking inspiration, food waste, time constraints ## [​](#feature-specifications) Feature Specifications 1. **AI Ingredient Recognition** * User Story: “As a user, I want to snap a photo of my fridge contents and get recipe suggestions” * Requirements: Computer vision API, ingredient database, accuracy >90% 2. **Personalized Recipe Engine** * User Story: “As a user, I want recipes that match my dietary preferences and skill level” * Requirements: User preference profiling, recipe difficulty scoring, dietary filters 3. **Smart Shopping Lists** * User Story: “As a user, I want to generate shopping lists for missing ingredients” * Requirements: Recipe parsing, inventory tracking, grocery store integration ## [​](#technical-requirements) Technical Requirements * Platform: iOS/Android native apps * Backend: Cloud-based ML models, recipe database API * Performance: `<`3 second photo processing, offline recipe viewing ``` -------------------------------- ### Retrieve Specific Deployment (cURL) Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-deployment Example cURL command to retrieve a specific deployed prompt by its ID. It demonstrates how to construct the GET request URL with `promptId` and `deploymentId` query parameters and how to include the `Authorization` header with a Bearer token. ```cURL # Replace with your values API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ID="my_deployment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentId=${DEPLOYMENT_ID}" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### JavaScript Example: Configure Adaline with OpenAI Source: https://www.adaline.ai/docs/api-reference/v2/types/config Demonstrates how to define a `ConfigType` object for an OpenAI provider, specifying the model, temperature, max tokens, and other runtime settings. ```javascript const config = { providerName: "openai", providerId: "6e94350a-95a9-48e7-8eab-a9f35ec2dc9d", model: "gpt-4o", settings: { temperature: 0.7, maxTokens: 1000, topP: 0.9, presencePenalty: 0.1, }, }; ``` -------------------------------- ### Example User Prompt for BudgetWise App Interview Questions Source: https://www.adaline.ai/docs/guides/prompt_library/generate_user_research_question This is a concrete example of the user prompt, demonstrating how to fill in the template for a specific scenario. It requests user interview questions for the 'BudgetWise Personal Finance App' targeting 'busy working parents', detailing their persona, product challenges, research goals, and interview focus. ```Prompt Generate user interview questions for BudgetWise Personal Finance App targeting busy working parents: * **User Persona:** Working parents aged 30-45 with household income 60K−60K-60K−120K, managing family expenses, saving for children’s education, limited time for financial planning * **Product Challenges:** Low user engagement after initial setup, users abandon budget creation midway, difficulty categorizing family expenses * **Research Goals:** Understand daily money management routines, identify barriers to consistent budgeting, discover motivation triggers * **Interview Focus:** Daily financial habits, family expense decision-making, budgeting pain points ``` -------------------------------- ### TypeScript Examples of Adaline Message Roles Source: https://www.adaline.ai/docs/api-reference/v2/types/message Demonstrates how to create `MessageType` objects for different roles (system, user, assistant) using TypeScript. These examples illustrate the basic structure of messages with text content for various communication scenarios. ```TypeScript // Examples of different roles const systemMessage: MessageType = { role: "system", content: [{ modality: "text", value: "You are a helpful assistant."}] }; const userMessage: MessageType = { role: "user", content: [{ modality: "text", value: "Hello, how are you?"}] }; const assistantMessage: MessageType = { role: "assistant", content: [{ modality: "text", value: "I'm doing well, thank you!"}] }; ``` -------------------------------- ### Example Authorization Header for API Requests Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment Demonstrates the required Authorization header format for Adaline API requests, using a Bearer token with your workspace API key. ```HTTP Authorization: Bearer YOUR_WORKSPACE_API_KEY ``` -------------------------------- ### Integrate Adaline with Application (Javascript) Source: https://www.adaline.ai/docs/quickstart/quickstart_engineers This Javascript example demonstrates how to integrate Adaline into an application. It covers fetching the latest prompt deployment, injecting runtime variables, executing a sample workflow using OpenAI, and sending telemetry logs back to Adaline. Users need to replace placeholder constants for Adaline API key, prompt ID, deployment environment ID, and OpenAI API key. ```Javascript const { v4: uuidv4 } = require('uuid'); // Adaline constants const ADX_API_KEY = "my_workspace_api_key"; const ADX_PROMPT_ID = "my_prompt_id"; const ADX_DEPLOYMENT_ENVIRONMENT_ID = "my_deployment_environment_id"; const ADX_BASE_URL = "https://api.adaline.ai"; // OpenAI constants const OPENAI_API_KEY = "my_openai_api_key"; // Replace variables in prompt with your runtime values function injectVariables(messages, variables) { return messages.map(message => ({ role: message.role, content: message.content.map(c => { let text = c.value; variables.forEach(v => { const placeholder = `{{${v.name}}}`; text = text.replaceAll(placeholder, v.value); }); return text; }).join(" "), })); } // Fetch latest deployment from Adaline async function getLatestDeployment(promptId, deploymentEnvironmentId) { const response = await fetch(`${ADX_BASE_URL}/v2/deployments?promptId=${promptId}&deploymentId=latest&deploymentEnvironmentId=${deploymentEnvironmentId}`, { headers: { Authorization: `Bearer ${ADX_API_KEY}`, }, }); if (!response.ok) { const error = await response.json(); throw new Error(`API Error: ${error.error}`); } return response.json(); } // Send log to Adaline after workflow execution async function sendLog(projectId, trace, span) { const response = await fetch(`${ADX_BASE_URL}/v2/logs/trace`, { method: "POST", headers: { Authorization: `Bearer ${ADX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ projectId, trace, spans: [span], }), }); if (!response.ok) { const error = await response.json(); throw new Error(`API Error: ${error.error}`); } return response.json(); } // Sample workflow using OpenAI async function callOpenAIChatCompletion(model, messages) { const spanId = uuidv4(); const spanStartTime = Date.now(); const response = await fetch("https://api.openai.com/v1/chat/completions", { method: "POST", headers: { "Authorization": `Bearer ${OPENAI_API_KEY}`, "Content-Type": "application/json", "X-Span-Id": spanId, }, body: JSON.stringify({ model: model, messages: messages, }), }); const spanEndTime = Date.now(); if (!response.ok) { const error = await response.json(); throw new Error(`OpenAI API Error: ${error.error.message}`); } const data = await response.json(); return { spanId, spanStartTime, spanEndTime, rawResponse: data, content: data.choices[0].message.content, }; } // Main function (async () => { try { // Start trace const traceId = uuidv4(); const traceStartTime = Date.now(); // Get latest deployment const deployment = await getLatestDeployment(ADX_PROMPT_ID, ADX_DEPLOYMENT_ENVIRONMENT_ID); const deploymentId = deployment.id; const projectId = deployment.projectId; const prompt = deployment.prompt; const model = prompt.config.model; const provider = prompt.config.providerName; // Inject variables into prompt const inputVariables = [{ name: "persona", value: "financial analyst" }]; const messages = injectVariables(prompt.messages, inputVariables); // Run sample workflow const openAIResult = await callOpenAIChatCompletion(model, messages); // End trace const traceEndTime = Date.now(); console.log("========== TRACE INFO =========="); console.log("Trace ID:", traceId); console.log("Trace Start:", new Date(traceStartTime).toISOString()); console.log("Trace End: ", new Date(traceEndTime).toISOString()); console.log("Trace Duration (ms):", ``` -------------------------------- ### JavaScript: Complete Message Structure Example Source: https://www.adaline.ai/docs/api-reference/v2/types/message Provides a comprehensive example of a MessageType object, demonstrating how to combine different content modalities like text, reasoning, and tool calls within a single message. It showcases the role, content array, and the nested structures for each modality. ```javascript const complexMessage: MessageType = { role: "assistant", content: [ { modality: "text", value: "I've analyzed the image and found the following information:" }, { modality: "reasoning", value: { type: "thinking", thinking: "The image appears to contain a chart. I should extract the data points.", signature: "reasoning-signature-456" } }, { modality: "tool-call", index: 0, id: "call_987654321", name: "analyze_chart", arguments: '{"chart_type": "bar", "data_points": ["Q1", "Q2", "Q3", "Q4"]}' } ] }; ``` -------------------------------- ### Example JSON Response for Latest Deployment Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment A sample JSON object illustrating the structure of the response when retrieving the latest deployment, including deployment metadata and the associated prompt configuration, messages, and variables. ```JSON { "id": "deployment_id", "createdAt": 1704067200000, "updatedAt": 1704067200000, "createdByUserId": "user_id", "updatedByUserId": "user_id", "projectId": "project_id", "promptId": "prompt_id", "deploymentEnvironmentId": "env_id", "prompt": { "config": { "model": "gpt-4o-mini", "providerName": "openai", "providerId": "provider_id", "settings": { "temperature": 0.7, "maxTokens": 1000, "topP": 1, "frequencyPenalty": 0, "presencePenalty": 0 } }, "messages": [ { "role": "system", "content": [ { "modality": "text", "value": "You are a helpful assistant. You answer questions based on a reference image and user input." } ] }, { "role": "user", "content": [ { "modality": "text", "value": "This is the user input\n\n###\n{{user_input}}\n###" }, { "modality": "image", "detail": "auto", "value": { "type": "url", "url": "{{reference_image}}" } } ] } ], "tools": [], "variables": [ { "name": "user_input", "modality": "text" }, { "name": "reference_image", "modality": "image" } ] } } ``` -------------------------------- ### Prompt Example Without Variables Source: https://www.adaline.ai/docs/pillars/iterate/variable_editor/variables_values This snippet illustrates a static prompt that does not incorporate any dynamic content or placeholders. ```Prompt “Write a haiku about nature that captures a peaceful moment.” ``` -------------------------------- ### Example Successful Trace Creation Response JSON Source: https://www.adaline.ai/docs/api-reference/v2/api/logs/post-log-trace An example JSON payload representing a successful response from the trace creation API, showing the generated trace ID and span IDs. ```JSON { "traceId": "trace_abc123def456", "spanIds": ["span_xyz789ghi012"] } ``` -------------------------------- ### Prompt Example With Variables Source: https://www.adaline.ai/docs/pillars/iterate/variable_editor/variables_values This snippet demonstrates a prompt that utilizes variables, enclosed in double curly braces (e.g., {{topic}}), allowing for dynamic content insertion based on different scenarios. ```Prompt “Write a haiku about {{topic}} that evokes {{emotion}} and includes {{element}}” ``` -------------------------------- ### Example User Prompt for Feature Prioritization Source: https://www.adaline.ai/docs/pillars/iterate/editor/response_schema Provides a detailed scenario to the AI assistant, asking it to compare three potential SaaS features based on their impact, effort, and risk. The prompt includes specific data points like engineering capacity, OKRs, and current support costs, requesting a decision on which single feature to build to best achieve the OKRs, with the output in JSON format. ```Prompt Question: Our SaaS platform can ship only one new feature next quarter. The options are: Team Analytics – weekly usage reports for managers AI-Powered Help Bot – answers user questions inside the app Bulk Import Tool – lets admins upload thousands of records at once Data: Engineering capacity: 8 story-points per week for 12 weeks OKRs: boost Weekly Active Teams (WAT) by +15 % and cut time-to-first-value (TTFV) to < 10 minutes Current support cost: $12 000 per month; each help ticket \u2248 $8 Task: Using clear, numbered steps, compare impact, effort, and risk for each feature. Decide which single feature we should build to best achieve the OKRs. Finish with “Final Answer: ” on its own line. Use JSON format ``` -------------------------------- ### Example User Prompt for API Issue Communication Source: https://www.adaline.ai/docs/guides/prompt_library/refining_internal_communications A concrete example of a user prompt provided to the AI, detailing a technical message about API rate limits and specific instructions for its rewrite for a cross-functional product team. ```AI Prompt Please rewrite this message with the following specifications: * **Original Message:** “The API endpoint is returning 429 errors due to rate limiting constraints we implemented last sprint. Current threshold is 1000 req/min but average usage patterns show 1200-1500 req/min during peak hours. We need to either increase limits or implement exponential backoff with retry logic. This is blocking the mobile team’s integration testing and will likely delay the Q2 release unless we address it this week. The database connection pool is also hitting max capacity at 95% utilization during these peak periods.” * **Target Audience:** Cross-functional product team including design, marketing, and executives * **Desired Tone:** Professional but approachable, solution-focused * **Context:** This is impacting a major product launch timeline * **Primary Goal:** Get team alignment on next steps and timeline ``` -------------------------------- ### Example LLM Response for Customer Review Analysis Source: https://www.adaline.ai/docs/guides/prompt_library/customer_review_analysis_template This snippet showcases a sample output from the AI model, presenting a structured analysis of customer reviews including overall sentiment, top recurring pain points with impact and priority, and actionable feature improvement ideas. ```LLM Output **Customer Review Analysis** ## [​](#overall-sentiment-analysis) Overall Sentiment Analysis * **Mixed Sentiment (60% Negative, 40% Positive)** * Customers appreciate product selection and deals but frustrated with core functionality ## [​](#top-5-recurring-pain-points) Top 5 Recurring Pain Points 1. **App Crashes During Checkout** (High Priority) * Impact: Direct revenue loss, cart abandonment 2. **Confusing Payment Process** (High Priority) * Impact: Conversion rate reduction 3. **Poor Search Functionality** (Medium Priority) * Impact: Product discovery issues 4. **Inaccurate Delivery Tracking** (Medium Priority) * Impact: Customer support burden 5. **Cluttered Interface Design** (Low Priority) * Impact: User experience degradation ## [​](#feature-improvement-ideas) Feature Improvement Ideas * **Immediate:** Implement crash reporting and fix checkout stability * **Short-term:** Redesign payment flow with progress indicators * **Medium-term:** Enhance search with AI-powered suggestions and better filtering * **Long-term:** Add wishlist functionality and improve delivery tracking integration ``` -------------------------------- ### Example AI Response for Feature Prioritization Analysis Source: https://www.adaline.ai/docs/pillars/iterate/editor/response_schema Demonstrates the AI assistant's structured reasoning process, comparing three features against given OKRs and constraints. The response includes a step-by-step analysis of impact, effort, and risk for each feature, concluding with a recommended feature, all formatted as a JSON object. ```JSON { "answer": "1. Establish OKRs and Constraints:\n - OKRs: Increase Weekly Active Teams (WAT) by 15% and reduce TTFV to under 10 minutes.\n - Engineering capacity: 8 story-points/week x 12 weeks = 96 story-points max this quarter.\n - Support cost: $12 000 per month; each help ticket \u2248 $8.\n\n 2. Compare Features Based on Impact, Effort, and Risk:\n\n A. Team Analytics\n - Impact: May increase WAT if managers use insights to engage teams, but not guaranteed. Unlikely to reduce TTFV as new users won't see value until reports are generated after use.\n - Effort: Medium; requires data aggregation, charting, report scheduling. Approximate effort is 30-40 story-points.\n - Risk: Low risk; reporting features are well-known, but less directly tied to OKRs.\n\n B. AI-Powered Help Bot\n - Impact: Could reduce support tickets by addressing user questions instantly, indirectly reducing support costs. May help reduce TTFV if bot helps onboard users faster.\n - Effort: High; requires integration with LLM provider, training, UX work. Estimated at 50-70 story-points.\n - Risk: Medium-to-high; LLM accuracy could impact user satisfaction, and training may require ongoing tuning. Some positive impact on OKRs but not guaranteed for WAT.\n\n C. Bulk Import Tool\n - Impact: Lets admins onboard whole teams faster, directly reducing TTFV (many users get value immediately as data is imported in bulk). Also likely to boost WAT, since more teams get active faster.\n - Effort: Medium; file upload, mapping, error handling, validation. Approximate effort is 40-50 story-points.\n - Risk: Medium; data import can be tricky (edge cases), but highly impactful if executed well.\n\n 3. Synthesis and Recommendation:\n - Team Analytics: Less direct impact on the stated OKRs.\n - AI-Powered Help Bot: Supports TTFV reduction and support cost, but with higher risk/effort, and unclear WAT impact.\n - Bulk Import Tool: Strong direct impact on both WAT and TTFV, within available engineering capacity, with moderate risk.\n\n Final Answer: Bulk Import Tool" } ``` -------------------------------- ### JavaScript Example: Configure Adaline with Anthropic Source: https://www.adaline.ai/docs/api-reference/v2/types/config Illustrates how to define a `ConfigType` object for an Anthropic provider, including model, temperature, max tokens, topK, topP, and stop sequences. ```javascript const config = { providerName: "anthropic", providerId: "6e94350a-95a9-48e7-8eab-a9f35ec2dc9d", model: "claude-3-sonnet-20240229", settings: { temperature: 0.3, maxTokens: 2000, topK: 40, topP: 0.95, stopSequences: ["\n\nHuman:", "\n\nAssistant:"], }, }; ``` -------------------------------- ### Fetch Adaline Deployment Details using cURL Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-deployment This cURL command demonstrates how to make a GET request to the Adaline AI API to retrieve information about a specific deployment. It requires setting your API key, prompt ID, and deployment ID as environment variables or directly in the URL and header. ```shell API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ID="my_deployment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentId=${DEPLOYMENT_ID}" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### Example of a Function Tool Definition Source: https://www.adaline.ai/docs/api-reference/v2/types/tools Demonstrates how to define a `ToolType` for a function-based tool, including its name, description, and parameters schema. ```typescript // Example of a function tool const searchTool: ToolType = { type: "function", definition: { schema: { name: "search_database", description: "Search for records in the database", parameters: { type: "object", properties: { query: { type: "string", description: "The search query" }, limit: { type: "number", description: "Maximum number of results", default: 10 } }, required: ["query"] } } } }; ``` -------------------------------- ### Function Name Validation Examples Source: https://www.adaline.ai/docs/api-reference/v2/types/tools Illustrates valid and invalid function names based on length and character constraints. ```typescript // Valid function names "search_database"; // ✅ Valid "getUserInfo"; // ✅ Valid "calculate_2024_tax"; // ✅ Valid // Invalid function names "search-database"; // ❌ Contains hyphen "search database"; // ❌ Contains space "search.database"; // ❌ Contains dot (""); // ❌ Empty string ("a_very_long_function_name_that_exceeds_sixty_four_characters_limit"); // ❌ Too long ``` -------------------------------- ### Template for User Input in Customer Review Analysis Source: https://www.adaline.ai/docs/guides/prompt_library/customer_review_analysis_template This snippet provides the structured template for user input, specifying placeholders for the product name, raw review data, specific focus areas for analysis, and current product priorities to guide the AI's analysis. ```Prompt Template Analyze the following customer reviews for `{{product_name}}`: * **Review Data:** `{{review_text}}` * **Focus Areas:** `{{specific_focus_areas}}` * **Current Priority:** `{{current_product_priorities}}` ``` -------------------------------- ### Retrieve Latest Deployment using cURL Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment Example cURL command to fetch the latest deployed prompt for a given prompt ID and deployment environment ID, requiring an API key for authentication. ```cURL # Replace with your values API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ENVIRONMENT_ID="my_deployment_environment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentEnvironmentId=${DEPLOYMENT_ENVIRONMENT_ID}&deploymentId=latest" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### JavaScript: Reasoning Content Examples Source: https://www.adaline.ai/docs/api-reference/v2/types/message Illustrates the structure of ReasoningContentType for both full and redacted reasoning. It shows how to define thinking processes with a signature and how to represent redacted content with a data placeholder. ```javascript // Full reasoning example const reasoningContent: ReasoningContentType = { modality: "reasoning", value: { type: "thinking", thinking: "I need to analyze the user's request carefully to provide the most helpful response...", signature: "reasoning-signature-123" } }; // Redacted reasoning example const redactedReasoningContent: ReasoningContentType = { modality: "reasoning", value: { type: "redacted", data: "This reasoning has been redacted for privacy" } }; ``` -------------------------------- ### Create Log Trace and Spans in JavaScript Source: https://www.adaline.ai/docs/api-reference/v2/api/logs/post-log-trace This JavaScript example demonstrates how to programmatically create a log trace and associated spans using the Adaline AI API. It includes setting up API credentials, making a POST request to the `/v2/logs/trace` endpoint, and handling the API response. ```JavaScript const API_KEY = "my_workspace_api_key"; const PROJECT_ID = "my_project_id"; const PROMPT_ID = "my_prompt_id"; const BASE_URL = "https://api.adaline.ai/v2/logs"; async function createLogTrace(trace, spans = []) { const response = await fetch(`${BASE_URL}/trace`, { method: "POST", headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ projectId: PROJECT_ID, trace, spans }) }); if (!response.ok) { const error = await response.json(); throw new Error(`API Error: ${error.error}`); } return response.json(); } async function main() { try { const traceResult = await createLogTrace( { startedAt: Date.now(), endedAt: Date.now() + 60000, name: "user_interaction", status: "success", referenceId: "trace_001", sessionId: "session_123", attributes: { "app_name": "my_app", "user_id": "user_123" }, tags: ["dev-env"] }, [ { promptId: PROMPT_ID, startedAt: Date.now(), endedAt: Date.now() + 30000, name: "llm_call", status: "success", content: { "type": "Model", "provider": "openai", "model": "gpt-4o-mini", "variables": { "user_input": { "modality": "text", "value": "librarian" } }, "cost": 0.002, "input": "{\n \"model\":\"gpt-4o-mini\",\n \"max_tokens\": 50,\n \"messages\": [{\n \"role\": \"system\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"You are a helpful librarian. You answer in 1-2 lines.\"\n }\n ]\n },\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What is Adaline?\"\n }\n ]\n }\n ]\n}", "output": "{\n \"id\": \"chatcmpl-BjKjQqVBN0WdTbkFHZ2C6tLXerKvl\",\n \"object\": \"chat.completion\",\n \"created\": 1750144152,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Adaline, or Adaptive Linear Neuron, is a type of artificial neural network that uses a linear activation function and employs the least mean squares (LMS) algorithm for training, aiming to minimize the difference between predicted and actual outputs.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 31,\n \"completion_tokens\": 47,\n \"total_tokens\": 78,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_34a54ae93c\"\n}" }, referenceId: "span_001", sessionId: "session_123", attributes: { "app_name": "my_app", "user_id": "user_123" }, tags: ["dev-env"] } ] ); console.log("traceResult:", traceResult); } catch (error) { console.error("Error creating trace:", error); } } main(); ``` -------------------------------- ### API Reference: Get Latest Deployment Endpoint Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment Detailed API documentation for retrieving the latest deployed prompt. Includes the HTTP method, endpoint path, required headers, query parameters, and possible response status codes. ```APIDOC Endpoint: GET /v2/deployments Headers: Authorization (string, required): Bearer Token Authentication. All API requests must include a valid workspace API key in the Authorization header using the Bearer token format. Example: Authorization: Bearer YOUR_WORKSPACE_API_KEY Query Parameters: promptId (string, required): The unique identifier of the prompt. deploymentEnvironmentId (string, required): The unique identifier of the deployment environment. deploymentId (string, required): Must be set to "latest" to retrieve the latest deployment. Response Status Codes: 200 OK 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 500 Internal Server Error ``` -------------------------------- ### Model Span Type Example (Adaline Types) Source: https://www.adaline.ai/docs/api-reference/v2/api/logs/post-log-span Illustrates the structure of a 'Model' span when using Adaline's internal types for input and output, showing how AI model interactions are logged. ```JSON { "type": "Model", "provider": "openai", "model": "gpt-4o-mini", "variables": { "user_input": { "modality": "text", "value": "librarian" } }, "cost": 0.002, "input": "{\"messages\": [{\"role\": \"user\", \"content\": [{\"modality\": \"text\", \"value\": \"You are a helpful {{user_input}}. You answer in 1-2 lines.\"}]}]}", "output": "{\"messages\": [{\"role\": \"assistant\", \"content\": [{\"modality\": \"text\", \"value\": \"Hello! How can I help you today?\"}]}]}" } ``` -------------------------------- ### Retrieve Adaline AI Deployment Details via cURL Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment This snippet demonstrates how to make a GET request to the Adaline AI API to retrieve details for a specific deployment. It requires an API key, prompt ID, and deployment environment ID. The URL is constructed using these parameters. ```bash API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ENVIRONMENT_ID="my_deployment_environment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentEnvironmentId=${DEPLOYMENT_ENVIRONMENT_ID}&deploymentId=latest" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### Retrieve Adaline.ai Deployment Details via cURL Source: https://www.adaline.ai/docs/api-reference/v2/api/deployments/get-latest-deployment This cURL command demonstrates how to perform a GET request to retrieve deployment information from the Adaline.ai API. It requires an API key, prompt ID, and deployment environment ID, and fetches the latest deployment details. ```cURL # Replace with your values API_KEY="your_workspace_api_key" PROMPT_ID="my_prompt_id" DEPLOYMENT_ENVIRONMENT_ID="my_deployment_environment_id" BASE_URL="https://api.adaline.ai/v2/deployments" URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentEnvironmentId=${DEPLOYMENT_ENVIRONMENT_ID}&deploymentId=latest" curl -X GET \ "${URL}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" ``` -------------------------------- ### Example Response for Successful Log Trace Creation Source: https://www.adaline.ai/docs/api-reference/v2/api/logs/post-log-trace This JSON snippet illustrates the expected successful response from the Adaline API's `/v2/logs/trace` endpoint after a log trace and spans have been successfully created. It provides the unique `traceId` and an array of `spanIds` generated by the system. ```JSON { "traceId": "trace_abc123def456", "spanIds": ["span_xyz789ghi012"] } ```