https://retellai.com/?utm_source=discord&utm_medium=seo logo
why doesn't web call testing have tool call and kn...
# ❓・ai-evy-support
b
@AI Evy why doesn't web call testing have tool call and knowledge base fetching notes? Only text testing.
a
Thanks for tagging me @Bobster2002. I'll look through relevant sources and get back to you shortly.
### Answer --- I don't have specific documentation explaining why web call testing differs from text testing in terms of displaying tool call and knowledge base fetching notes. What I can share from the available sources: - The Conversational Flow Testing Suite includes features like debugging AI responses, simulation testing, and batch simulation testing. [(1) ]() - Knowledge Base Retrieval Visibility was added so you can "view Knowledge Base retrieval trunks directly within the Test LLM feature" to check if questions are retrieving the correct information. - After calls end, there's a
knowledge_base_retrieved_contents_url
field that provides a URL to view the knowledge base retrieved contents. [(2) ]() The Test LLM feature appears to have more detailed visibility into knowledge base retrieval compared to web call testing based on the changelog notes, but the sources don't explain the specific reasoning behind this difference. Check out these potentially useful sources: - [Knowledge Base]() - [Platform Changelogs | Retell AI]() - [List Calls]() Would you like me to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy can we use {{extracted_variables}} as information to prompt for KB fetches? or is it strictly transcript based?
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer Based on the available documentation, Knowledge Base retrieval is strictly transcript-based. [(1) ]() The documentation states: "During the call, when the agent is about to respond, it will use the transcript so far (prompt is not included) to find the most relevant chunks from the knowledge base, and feed them to the LLM as context." This means: - KB retrieval uses only the conversation transcript to determine relevance - The prompt itself is not included in the retrieval query - There's no mention of extracted dynamic variables being used to influence KB fetches So extracted variables like
{{customer_name}}
or other values captured via the Extract Dynamic Variable tool would not directly affect what gets retrieved from the knowledge base—only what's been said in the conversation transcript matters for retrieval. Check out these potentially useful sources: - [Knowledge Base]() - [Extract Dynamic Variables]() - [Platform Changelogs | Retell AI]() Would you like me to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy can you give suggestions on how I would be able to get more consistent Knowledge base fetching? Tools? Give me brainstorming ideas here
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer --- Here are some ideas based on the documentation and community discussions: ### File Format & Structure - **Prefer
.md
(Markdown) files over `.txt`**—well-structured Markdown is chunked and retrieved more accurately. [(1) ]() - Use clear, descriptive headings and keep each section focused and reasonably short. If a section becomes long, split it into multiple subsections. - Write short paragraphs and lists to separate concepts; avoid walls of text. - **Use correct file extensions**—one user found their KB wasn't retrieving properly because XML-formatted files had
.md
extensions, causing incorrect processing. [(2) ]() ### Content Best Practices - Reformat tabular data (like CSVs) into FAQ-style entries (e.g., "What's the price of X?" → "$99") . [(3) ]() - Split complex data into smaller, focused files. - Group related information within the same section so chunks remain cohesive and relevant. [(1) ]() - Avoid ambiguity—include names, dates, units, and avoid ambiguous pronouns like "it" or "this" because prior chunks may not be present. ### Node-Level KB (Conversation Flow) - Assign specific knowledge bases to specific nodes in your conversation flow—this retrieves more accurate answers based on context and responds with lower latency by narrowing the search space. [(4) ]() ### Retrieval Settings - Adjust Chunks to retrieve (1-10, default 3) and Similarity Threshold (default 0.6) in your agent's KB settings. A higher similarity threshold gives fewer but more similar matches. [(1) ]() ### Alternative Approach: Custom Fun
ctions - If it's tabular pricing or structured data, consider building a custom function/tool to look up answers instead of relying on free-text KB search. [(3) ]() ### Auto-Crawling Tips - Use more granular paths for auto-crawling instead of broad paths with many exclusion URLs—this improves crawl performance. [(1) ]()
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Knowledge base bug](https://discord.com/channels/1186424376300679209/1395139321622958160) [[3] Using knowledge base not how I wanted](https://discord.com/channels/1186424376300679209/1357009953247727808) [[4] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy Give me an example of a custom function / look up tool that I could use?
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer Here's an example of a custom function for looking up data (like pricing or product info) instead of relying on KB retrieval: ### Example: Weather Lookup Function 1. Configure in dashboard: [(1) ]() - Name:
get_weather
- Description:
Get weather for a city
- HTTP Method: POST - Endpoint URL: Your server endpoint (e.g., ` 2. Define parameters (JSON schema) :
Copy code
json
{
  "type": "object",
  "required": [
    "order_id"
  ],
  "properties": {
    "name": {
      "type": "object",
      "description": "",
      "properties": {
        "first_name": {
          "type": "string",
          "description": "User first name"
        },
        "last_name": {
          "type": "string",
          "const": "{{last_name}}"
        }
      }
    },
    "order_id": {
      "type": "number",
      "const": 1234
    }
  }
}
3. Server-side handler (TypeScript example) :
Copy code
javascript
import { Retell } from "retell-sdk";
this.app.post("/check-weather", async (req: Request, res: Response) => {
  if (
    !Retell.verify(
      JSON.stringify(req.body) ,
      process.env.RETELL_API_KEY,
      req.headers["x-retell-signature"] as string,
    )
  ) {
    console.error("Invalid signature") ;
    return;
  }
  const content = req.body;
  if (content.args.city === "New York") {
    return res.json("25f and sunny") ;
  } else {
    return res.json("20f and cloudy") ;
  }
}) ;
For your pricing lookup use case, you'd adapt this pattern: - Create a function like
lookup_price
with a parameter for
product_name
- Your endpoint queries your database/spreadsheet and returns the exact price - The LLM calls this function when users ask about pricing, giving you deterministic results vs. KB retrieval Key benefits: - Response variables let you extract values from the API response and save them as dynamic variables for later use - You can configure "Speak during execution" and "Speak after execution" behavior - Function result is capped at 15000 characters
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.