I’m building a chatbot with the following capabilities:
1. Custom skills like:
* Fetching latest notes
* Searching notes by term
* Showing platform stats
(These call a secured API route in my nextjs app.)
2. RAG-based answers from a knowledge base.
I wanted to clarify a few things:
* Do custom skills that call my own secured API consume AI tokens?
* Does RAG (knowledge base Q&A) consume AI tokens every time a user asks something?
* If I launch this for around ~500 users, how will token usage scale?
I’m a student building this as a side project and I want to avoid unexpected AI credit usage.
Could someone guide me on how token consumption works in these cases and how I can minimize costs?
Thanks in advance 🙏
https://cdn.discordapp.com/attachments/1477631746743992450/1477633406136221838/image.png?ex=69a578d9&is=69a42759&hm=83e09c3ede19903fdba5d48b583d87210f6a574b1af1515626115a8a6e0add21&
fierce-petabyte-9019
03/01/2026, 11:47 AM
also, sometimes - the bot doesn't show platform stats even though it receives the data from the api
I dry ran the api and it's working fine
I also checked the logs of the bot and it is indeed receiving the data
but 60-70% of time it doesn't reply when I type "show platform stats" or just "platform stats"
one thing I noticed was whenever I clicked on the predefined button it gave me "show platform stats" it almost always reply with the stats
How do I solve this?
Other features work fine.
Does knowing the intent like "What are the stats of the platform?" which triggers the api call also consume ai tokens?
so like, knowing which skill to execute based on user's input and giving the appropriate formatted output (eg. in tabular form, or in points format)
fierce-petabyte-9019
03/04/2026, 4:32 PM
@loud-crowd-60573
l
loud-crowd-60573
03/04/2026, 4:51 PM
If it's just different forms of generated responses it won't have much of an effect. The real cost comes from how hard the LLM needs to work. You can always:
- test different replies in the emulator
- check the logs on the studio page to check the AI costs per message and compare!