> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iblueprint.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Chatbot Building Best Practices

## Best practices

* **Separate system and user prompts** – use structured prompt blocks for clarity. Keep system instructions at the start and example interactions after RAG results to avoid confusion.
* **Control retrieval** – set appropriate similarity thresholds and max chunks for each knowledge base. Use priority values to rank sources and fallback thresholds to switch retrieval methods.
* **Secure API calls** – provide proper authentication in API sources and sanitize query parameters. Use caching to improve performance.
* **Test before deploying** – create multiple test scenarios to verify that the bot behaves correctly with different prompts, knowledge bases and metadata.
* **Provide clear onboarding** – write a friendly initial message and starter prompts to guide users. Include a disclaimer reminding users to verify information.
* **Customize the look** – align chat colours and fonts with your brand. If embedding on a website, adjust dimensions for a seamless fit.

By following these steps and best practices, you can build sophisticated chatbots on iBlueprint.ai that leverage structured prompts, retrieval‑augmented generation, external APIs and customizable user interfaces.
