Register and share your invite link to earn from video plays and referrals.

Search results for CostOptimization
CostOptimization community
One keyword maps to one global community path.
Create community
People
Not Found
Tweets including CostOptimization
You're paying for the same tokens twice. Every API call reloads the same context: system prompts, docs, history. Charged in full. Every time. Context caching in Model Studio fixes that. Learn how today 👇 #AlibabaCloud# #ModelStudio# #CostOptimization#
Show more
# Snowflake Features and Practical Usage 🚀 "Bumping the size up makes it faster, but what about cost?" Snowflake cost optimization hinges on answering that question correctly. Let's master virtual warehouse sizing and auto-suspend. 📌 Title and Feature URL Title: Working with Virtual Warehouses URL: 📝 Overview A virtual warehouse is a cluster of compute resources that supplies the CPU, memory, and temporary storage needed to run SQL queries and data operations such as INSERT, UPDATE, DELETE, and COPY. It consumes credits only while running and can be resized or auto-suspended flexibly. Designing size and auto-suspend per workload is the first step in Snowflake cost optimization. 🔧 How It Works Key facts about warehouse sizing and billing: ・Sizes range from X-Small to 6X-Large, and each step up doubles compute and credit consumption. X-Small=1, Small=2, Medium=4, Large=8, X-Large=16, 2X-Large=32 ... up to 6X-Large=512 credits/hour. ・Billing is per-second with a 60-second minimum each time a warehouse starts or resumes. For example, an X-Large running 61 seconds costs about 0.271 credits, while a full hour costs 16 credits. ・Larger warehouses speed up large, complex queries, but larger is not necessarily faster for small, basic queries. ・Besides standard warehouses, Snowpark-optimized warehouses target memory-heavy workloads like ML training. 🛠 Practical Usage ・Use AUTO_SUSPEND (on by default) to suspend after idle time and AUTO_RESUME (on by default) to resume when a statement arrives, preventing wasted credits while idle. ・Create with CREATE WAREHOUSE etl_wh WAREHOUSE_SIZE = XLARGE; for batch, and use WAREHOUSE_SIZE = SMALL AUTO_SUSPEND = 60 for ad-hoc analytics to "pay only for what you use." ・Add INITIALLY_SUSPENDED = TRUE to create the warehouse in a suspended state. ・Warehouses can be resized even while running, so you can temporarily scale up just before a heavy job. 🎯 Use Cases ・Run a daily batch on X-Large to finish fast. Since one size step roughly doubles speed and halves runtime, you cut wall-clock time at a comparable credit cost. ・Set an ad-hoc analytics warehouse to Small with AUTO_SUSPEND=60 so it costs nothing when nobody is querying. ・For data loading, small-to-medium sizes are often sufficient; tune based on file count and size rather than warehouse size. ⚠️ Caveats ・Every resume bills a 60-second minimum, so an extremely short AUTO_SUSPEND (a few seconds) can backfire by triggering frequent start/stop cycles. ・A large size is wasted on small queries. "Scale up for slow queries" is the rule — bigger is not universally better. ・Loading performance depends more on file count and size than on warehouse size. Consider parallelizing files before scaling up. #Snowflake# #DataEngineering#
Show more
$ASAN Asana CEO: Model routing is becoming a margin lever “We've gotten rather good at… figuring out which types of tasks should go to which types of model… to both solve for quality and cost optimization.”
Show more
.@grok estimates that sending 4 humans to summit Olympus Mons (~22km, the tallest volcano in the solar system) would cost $1.5–18B, mostly depending on how well @elonmusk does with Starship cost optimization. I think "we" should do it.
Show more
# Practical and Useful Patterns with ADK 🚀 Parallel tool execution, response size reduction, latency and token cost optimization — maximize production throughput with ADK's Tool Performance guide. 📌 Title: Tool Performance — Optimizing Tool Execution for Production 🔗 URL: 🧩 Overview ADK provides multiple approaches for optimizing tool performance: parallel execution of read-only tools, response size reduction for token cost optimization, and latency reduction best practices. These optimizations are essential for achieving high throughput in production environments. 🛠 Usage Examples of parallel execution and response optimization. First, define multiple read-only tools: `get_user_profile(user_id: str)`, `get_user_orders(user_id: str)`, and `get_user_preferences(user_id: str)` are side-effect-free functions that ADK can safely execute in parallel. Next, design a response-size-optimized tool like `search_products(query: str, limit: int = 5)` that returns only essential fields (`id`, `name`, `price`) while omitting image URLs, full descriptions, and metadata. Finally, create an `Agent` with `name="customer_service"` and `model="gemini-2.5-flash"`, passing all four functions in the `tools` list. 🏗 Practical Patterns **Parallel Execution Criteria**: Tools with no side effects and no mutual dependencies are safe for parallel execution. The LLM can invoke multiple tools simultaneously, and ADK executes them in parallel. Data retrieval tools (GET-equivalent) are great candidates. For parallel-friendly design, define independent tools like `get_weather(city: str)`, `get_news(topic: str)`, and `get_stock_price(symbol: str)`. Each is a read-only function returning a simple dict with its respective data (weather conditions, news articles, stock prices). When the LLM invokes all three simultaneously, ADK automatically runs them in parallel. **Response Size Optimization**: Tool return values consume LLM context window tokens. Removing unnecessary fields, summarizing data, and implementing pagination can dramatically reduce token costs. **Latency Optimization Checklist**: 1. Cache cacheable results 2. Set timeouts on external API calls 3. Avoid returning unnecessarily large data 4. Split into multiple small tools to encourage parallel execution 💡 Use Cases 📊 Parallel fetching from multiple data sources for dashboards 🔍 Field filtering in search results for token savings ⚡ Parallel API calls across microservices 💰 Token cost optimization in high-volume request environments ⚠️ Caveats - Parallel execution of tools with side effects (writes, deletes) can cause race conditions. Sequential execution is recommended for write operations. - Over-reducing responses may leave the LLM without sufficient information, degrading answer quality. Ensure essential information is always included. - Timeouts that are too short may interrupt legitimate responses. Set appropriate timeout values. ✨ Small optimizations compound into significant performance differences in production. Start by reviewing your response sizes! #ADK# #AIAgent#
Show more
“What could I actually use Hermes for?” Well, here are 326 answers. 64 more real Hermes use cases have been added to the official docs, covering everything from personal assistants and business operations to coding, research, integrations, content, self-hosting, cost optimization and a whole lot more. And even if you’re already using Hermes regularly, this is a great place to find more things that fit into your existing workflows and more work you could be handing off to an agent. If you're trying to figure out what else you could be using Hermes for, this is a really good place to start. And you don't even have to leave Hermes Desktop to find them. Open Capabilities, select Docs, then head to User Stories & Use Cases. Direct link in the first comment.
Show more
# Useful but Little-Known Features of OpenAI Agent SDK 🌍 Ever wanted to pass provider-specific parameters that the SDK doesn't directly expose? With `extra_args`, you can add arbitrary provider-specific fields to `ModelSettings`. 📌 Title: Passing extra_args 🔗 URL: 🧩 Overview By passing a dictionary to the `extra_args` parameter of `ModelSettings`, you can send provider-specific request fields that aren't exposed as top-level SDK properties. For example, you can specify OpenAI Responses API fields like `service_tier` or `user`. This lets you use new API parameters without waiting for an SDK update. 🛠 How to use it ```python from agents import Agent, ModelSettings agent = Agent( name="English agent", instructions="You only speak English", model="gpt-4.1", model_settings=ModelSettings( temperature=0.1, extra_args={ "service_tier": "flex", "user": "user_12345", }, ), ) ``` 🏗 Building it into production ・Use `service_tier` for cost optimization (e.g., `"flex"` for cheaper low-priority batch processing) ・Set the `user` field to enable per-user tracking and abuse detection ・Adopt new API parameters immediately on release without waiting for SDK updates ・Build `extra_args` dynamically from environment variables or config files for per-environment tuning 💡 Use cases 💰 Cost reduction with `service_tier: "flex"` for batch workloads 👤 Per-user usage tracking via the `user` field 🔧 Early adoption of newly released provider features 🏢 Injecting tenant-specific parameters in multi-tenant environments ⚠️ Watch out Do not set the same request field through both a direct `ModelSettings` property and `extra_args`. Duplicate settings may cause unexpected behavior. Values passed via `extra_args` must conform to the provider's API specification, as the SDK does not validate them. ✨ With extra_args, unlock provider-specific optimizations beyond the SDK's built-in surface. #OpenAIAgentSDK# #AIAgent#
Show more
# Practical and Useful Patterns with ADK Sending the same system prompts and tool definitions over and over? Context Caching dramatically reduces repeated prefix token costs 💰 📌 **Title**: Context Caching 🔗 **URL**: ## 🧩 Overview Context Caching caches the static portions of context sent to the LLM (system instructions, tool definitions, etc.) to reduce repeated token costs. By configuring `ContextCacheConfig`, instead of resending the same prefix tokens with every request, the agent references cached context. The cost optimization impact is especially significant in multi-user environments where many users share the same agent with identical prompts and tool definitions. ## 🛠 How to Use Import `Agent` from `google.adk` and `ContextCacheConfig` from `google.adk.agents`. Create a cache configuration with `ContextCacheConfig(max_entries=100, ttl_seconds=3600)` to set the maximum number of cache entries and the time-to-live in seconds. Pass this `cache_config` to the `Agent`'s `context_cache_config` parameter so that the static portions of the `instruction` (your long system prompt) and `tools` definitions (e.g., `search_kb`, `create_ticket`, `escalate`) are cached, reducing repeated token costs. ## 🏗 Practical Usage **Large-scale customer support optimization:** In a customer support agent, these elements are common across all users: - System instructions (response guidelines, tone, prohibited actions) - Tool definitions (knowledge base search, ticket creation, escalation) - Few-shot examples These static contexts can amount to thousands of tokens per request. For a support bot handling 10,000 requests daily, Context Caching delivers massive token savings. **RAG pipeline optimization:** When tool definitions include knowledge base schemas and search parameter descriptions, caching these optimizes per-query costs. **Multi-tenant SaaS:** When sharing the same agent definition across multiple tenants, only tenant-specific information becomes the dynamic portion while common prompts and tool definitions are shared via cache. ## 💡 Use Cases - 💰 Cost reduction: Cut costs from repeatedly sending long system prompts - 🚀 Latency improvement: Faster prefill processing on cache hits - 👥 Multi-user optimization: Share cache across multiple users with the same prompts - 🏢 Multi-tenant: Efficiently cache tenant-common context portions - 📚 Large tool definitions: Optimize tool definition costs for agents with many tools ## ⚠️ Caveats - Context Caching depends on model provider support. Verify available models in advance - TTL too short reduces hit rates; too long consumes memory. Tune based on access patterns - Benefits are limited if system prompts or tool definitions change frequently - Caching itself may incur costs. Check provider pricing and evaluate total cost - Dynamic context (user-specific information, etc.) is not cacheable. Design clear separation between static and dynamic portions ✨ Context Caching implements "don't repeat yourself" at the infrastructure level. It delivers major cost optimization benefits in multi-user environments! #ADK# #AIAgent#
Show more
Building with AI shouldn’t mean stitching together models, APIs, and infrastructure. QwenCloud is built for the next AI developer journey: a website for human exploration, Skills for agent reasoning, and CLI for workflow execution. One platform for model access, multimodal APIs, fine-tuning, deployment, monitoring, and predictable cost control. At Qwen Conference, the QwenCloud team walks you through it all live: how to access the Qwen model family, fine-tune for your use case, deploy at scale, and monitor in production. Enterprise-grade scalability, reliability, and cost optimization — built in. If you're an enterprise builder, a developer, or anyone who's ever thought "there has to be a better way to ship AI" — this is your session. 📍 Sep 4, Bangkok — Register →
Show more
Building with AI shouldn’t mean stitching together models, APIs, and infrastructure. QwenCloud is built for the next AI developer journey: a website for human exploration, Skills for agent reasoning, and CLI for workflow execution. One platform for model access, multimodal APIs, fine-tuning, deployment, monitoring, and predictable cost control. At Qwen Conference, the QwenCloud team walks you through it all live: how to access the Qwen model family, fine-tune for your use case, deploy at scale, and monitor in production. Enterprise-grade scalability, reliability, and cost optimization — built in. If you're an enterprise builder, a developer, or anyone who's ever thought "there has to be a better way to ship AI" — this is your session. 📍 Sep 4, Bangkok — Register →
Show more