An AI model should use pre-existing, fast databases for common information. Calling a large language model (LLM) for every request is slow and expensive. A developer must connect the AI model to efficient data sources.
By Pawan Nayar · from the LLOS AI Learning record
An AI model should use pre-existing, fast databases for common information.
Calling a large language model (LLM) for every request is slow and expensive. A developer must connect the AI model to efficient data sources.
An AI model can use a fast, local database for common expressions. This database should contain curated quotes, proverbs, and idioms. This method is much faster than asking a large language model for every search. It also saves money because fewer LLM calls are needed.
A developer builds an AI writing assistant. The assistant needs to suggest idioms. If the developer connects the assistant to a database of idioms, suggestions appear instantly. If the developer makes the assistant ask an LLM for each idiom, the user waits many seconds for a response.
Resolved from this lesson's own record — real definitions, not invented for this page.
More from the same record, pulled by shared topic — not written new for this page.
A local server should use a special tool called `ThreadingMixIn`. This tool allows the server to do many things at once.
A developer should bypass a server for tasks with more than 100 API calls. Routing many calls through a server makes them wait in line.
A developer needs to store many questions for a quiz application. Storing questions in JSON files can be slow.
A developer can scale an AI application by automating data generation. This means using an AI model to create new data instead of doing it by hand.
An AI model should use pre-existing, fast databases for common information. Calling a large language model (LLM) for every request is slow and expensive. A developer must connect the AI model to efficient data sources.