<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Vrushank</title>
    <description>The latest articles on Forem by Vrushank (@vrv).</description>
    <link>https://forem.com/vrv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1118432%2F721674d2-702a-4180-ad7a-4973f26f6c68.jpg</url>
      <title>Forem: Vrushank</title>
      <link>https://forem.com/vrv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vrv"/>
    <language>en</language>
    <item>
      <title>LLMs in Prod 2025: Insights from 2 Trillion+ Tokens</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Tue, 21 Jan 2025 10:47:15 +0000</pubDate>
      <link>https://forem.com/portkey/llms-in-prod-2025-insights-from-2-trillion-tokens-2i21</link>
      <guid>https://forem.com/portkey/llms-in-prod-2025-insights-from-2-trillion-tokens-2i21</guid>
      <description>&lt;p&gt;2024 marked the year when AI moved from experiments to mission-critical systems. But as organizations scaled their implementations, they encountered challenges that few were prepared for.&lt;/p&gt;

&lt;p&gt;Through Portkey's AI Gateway, we've had a unique vantage point into how enterprises are building, scaling, and optimizing their AI infrastructure. We’ve worked with &lt;strong&gt;650+ organizations&lt;/strong&gt; , processing over &lt;strong&gt;2 trillion tokens&lt;/strong&gt; across &lt;strong&gt;90+ regions&lt;/strong&gt;. Along the way, everyone kept asking us the same questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Which providers are leading the way?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;How can we ensure reliability in production?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What patterns are emerging in enterprise AI infrastructure?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To help answer these questions, our team has analyzed 2 trillion+ tokens processed by our AI gateway in 2024. The result is the &lt;strong&gt;LLMs in Prod&lt;/strong&gt; —a data driven report of how companies are using LLMs in production going forward. Today we are excited to share this with you.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Learnings from 2 Trillion+ Tokens
&lt;/h2&gt;

&lt;p&gt;As organizations scaled their AI efforts, some shocking insights stood out. These takeaways highlight the challenges and opportunities in building reliable, scalable AI systems.&lt;/p&gt;

&lt;p&gt;With LLMs taking over the world, everyone’s asking the same question: &lt;em&gt;“Which LLM is the most utilized of them all?”&lt;/em&gt;  Let’s unpack what we’ve seen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu6brvmypynwasq3o560d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu6brvmypynwasq3o560d.png" alt="LLMs in Prod 2025: Insights from 2 Trillion+ Tokens" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Multi-Provider Strategies Are Becoming the Norm&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Our data shows a dramatic shift toward multi-provider adoption, driven by the need for redundancy and improved performance. Multi-provider adoption jumped from 23% to 40% in the last year.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu2sm2ou8zcd7yxz0a2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu2sm2ou8zcd7yxz0a2v.png" alt="LLMs in Prod 2025: Insights from 2 Trillion+ Tokens" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Reliability is the New Battleground&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As enterprises scale their AI systems, reliability has emerged as a key concern. Our analysis revealed that during peak times, some providers experience failure rates of over 20%.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajfqy00hsi4cndgmp5je.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajfqy00hsi4cndgmp5je.png" alt="LLMs in Prod 2025: Insights from 2 Trillion+ Tokens" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. Complexity is Scaling with Demand&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Enterprises rapidly moved from basic LLM usage (80% simple queries in early 2024) to more sophisticated implementations, with simple queries dropping to 20% by late 2024 as companies adopt complex workflows and multi-step chains that use more tokens per request.&lt;/p&gt;

&lt;p&gt;In just a year we saw:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100-500 token requests grew from 10% to 37%.&lt;/li&gt;
&lt;li&gt;500+ token buckets saw consistent, sustained growth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqwzbvkms0ghaojsfd3n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqwzbvkms0ghaojsfd3n.png" alt="LLMs in Prod 2025: Insights from 2 Trillion+ Tokens" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;LLM Token Usage Pattern | LLMs in Prod 25&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;The Road Ahead&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As we look to 2025, it's clear that the focus must shift from basic implementation to building reliable, efficient, and secure AI infrastructure at scale. But the path forward isn't obvious.&lt;/p&gt;

&lt;p&gt;In our complete "LLMs in Production 2025" report, we analyzed insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detailed reliability benchmarks across providers&lt;/li&gt;
&lt;li&gt;Architectural patterns for multi-provider deployments&lt;/li&gt;
&lt;li&gt;Cost optimization frameworks for complex workflows &lt;/li&gt;
&lt;li&gt;LLM Adoption patterns and more..&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Get the Full Report ➡
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://portkey.sh/llmsinprod25?ref=dev.to"&gt;LLMs in Prod 25 Report&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productionguides</category>
    </item>
    <item>
      <title>Model Context Protocol for building reliable, enterprise LLM applications</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Tue, 17 Dec 2024 07:48:32 +0000</pubDate>
      <link>https://forem.com/portkey/model-context-protocol-for-building-reliable-enterprise-llm-applications-1f65</link>
      <guid>https://forem.com/portkey/model-context-protocol-for-building-reliable-enterprise-llm-applications-1f65</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fra1xhy3mre7ahs24o9cn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fra1xhy3mre7ahs24o9cn.png" alt="Model Context Protocol for building reliable, enterprise LLM applications" width="800" height="629"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Picture the modern enterprise LLM application scene - from customer service chatbots parsing thousands of queries to data analysis systems processing vast business insights. Large Language Models (LLMs) power these systems, but there's a critical challenge that many organizations overlook: context management.&lt;/p&gt;

&lt;p&gt;As enterprises scale their LLM deployments, they face a huge problem. These powerful models need more than just computational resources - they need smart, efficient ways to access and process context from diverse data sources. Traditional approaches to context handling often create bottlenecks, leading to inconsistent performance and rising costs.&lt;/p&gt;

&lt;p&gt;Enter the Model Context Protocol (MCP). By creating a standardized bridge between models and data sources, MCP tackles the context challenge head-on.&lt;/p&gt;

&lt;p&gt;What is Model Context Protocol (MCP)?&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; is a framework designed to improve how context is managed within machine learning models, particularly large language models (LLMs). It is a standardized protocol that governs how models handle and process contextual information, ensuring that this information is passed efficiently through the system during training, inference, and deployment.&lt;/p&gt;

&lt;p&gt;In traditional LLM deployments, managing context—such as user inputs, historical data, or domain-specific information—can become increasingly complex as models scale. This can lead to challenges such as model drift, inefficiencies, and poor response quality. MCP addresses these challenges by creating a clear and consistent way to manage and enrich context across various LLM use cases.&lt;/p&gt;

&lt;p&gt;MCP's architecture is built on three fundamental components that enable sophisticated context management in LLM deployments&lt;/p&gt;

&lt;p&gt;The protocol implements a dedicated context management system that maintains the state across the entire model operation cycle. It tracks contextual dependencies, manages priority queues for context updates, and ensures critical information persists throughout model inference. This layer prevents context loss that can degrade output quality in high-throughput scenarios.&lt;/p&gt;

&lt;p&gt;MCP also provides a framework that allows context management to scale effectively, making it easier to handle larger datasets and more complex workflows. MCP ensures that the model’s outputs remain consistent and aligned with the provided context, regardless of the model size or complexity.&lt;/p&gt;

&lt;p&gt;By implementing MCP,  LLMs can process information more efficiently, resulting in faster, more accurate, and resource-efficient applications.&lt;/p&gt;

&lt;p&gt;It also ensures that the model’s outputs remain consistent and aligned with the provided context, regardless of the model size or complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the challenges in enterprise LLM Apps?
&lt;/h2&gt;

&lt;p&gt;Firstly, AI integrations &lt;strong&gt;lack standardization&lt;/strong&gt; , requiring teams to build custom APIs and connectors for each integration point. This creates inconsistent implementations across projects and increases technical complexity.&lt;/p&gt;

&lt;p&gt;Building workflows across multiple tools requires extensive custom logic. Teams spend valuable time orchestrating these connections instead of focusing on core application features.&lt;/p&gt;

&lt;p&gt;Also, LLM applications need consistent access to structured data, but &lt;strong&gt;retrieving and processing information across diverse platforms&lt;/strong&gt; is complicated. Enterprise environments, with their numerous data sources, face this challenge acutely.&lt;/p&gt;

&lt;p&gt;Interoperability issues arise when integrations are tied to specific platforms. This creates technical barriers when scaling AI systems across different tools and environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt; presents its own set of challenges when integrating external tools. Teams must balance data accessibility with protection against unauthorized access while maintaining system performance. Debugging AI workflows requires specialized approaches - without proper monitoring tools, identifying and fixing issues in production becomes time-consuming.&lt;/p&gt;

&lt;p&gt;As systems grow, &lt;strong&gt;maintaining custom integrations&lt;/strong&gt; demands increasing engineering effort. Development teams often find themselves managing integration logic rather than building new features. This technical overhead directly impacts development velocity and the ability to innovate. Custom-built integrations become harder to scale, particularly as organizations add more tools and data sources to their AI infrastructure.&lt;/p&gt;

&lt;p&gt;These challenges become more complex with each new integration, tool, or data source added to the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does MCP address these challenges?
&lt;/h2&gt;

&lt;p&gt;MCP implements a standardized protocol layer that sits between LLMs and external systems. This layer handles complex context management through intelligent routing and state management. Rather than building custom integrations for each new tool or data source, developers can leverage MCP's protocol to establish consistent, reliable connections.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXdQR2I6GhcYPjBYTLhZAcBaFKdygfszEn0j7Cump8XG-sEAOWxflVqY20kf4XZRykqxtqhrHoX4Z4uZAad4aqoGnc0Q0g1t_RsgLoZJNMLybE8Ac4eroNYc4xS0pPgXHyzxFUZ52w%3Fkey%3DIsGNiSRhrkHyNt69qnptW9Gk" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXdQR2I6GhcYPjBYTLhZAcBaFKdygfszEn0j7Cump8XG-sEAOWxflVqY20kf4XZRykqxtqhrHoX4Z4uZAad4aqoGnc0Q0g1t_RsgLoZJNMLybE8Ac4eroNYc4xS0pPgXHyzxFUZ52w%3Fkey%3DIsGNiSRhrkHyNt69qnptW9Gk" alt="Model Context Protocol for building reliable, enterprise LLM applications" width="800" height="629"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Model Context Protocol Architecture (Source)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The protocol's architecture introduces sophisticated context handling. It implements real-time state synchronization, allowing LLMs to maintain contextual awareness across multiple tools and data sources.&lt;/p&gt;

&lt;p&gt;From a security standpoint, MCP builds robust access controls at the protocol level. It implements granular permissions and audit trails, ensuring that sensitive data remains protected while maintaining system performance. The protocol's built-in monitoring capabilities provide deep visibility into context flow, making it easier to identify and resolve issues in production.&lt;/p&gt;

&lt;p&gt;For development teams, MCP significantly reduces integration complexity through its SDK-first approach. Rather than writing custom integration code, developers can use standardized interfaces to connect new tools and data sources.&lt;/p&gt;

&lt;p&gt;The protocol's stateful connection management ensures reliable performance at scale. MCP's distributed architecture efficiently handles increasing loads as systems grow without requiring architectural overhauls. This built-in scalability removes the traditional bottlenecks that plague custom integrations.&lt;/p&gt;

&lt;p&gt;By providing this comprehensive infrastructure layer, MCP transforms the development and deployment of LLM applications. Teams can focus on building core functionality rather than managing complex integration logic, leading to more robust and maintainable AI systems.&lt;/p&gt;

&lt;p&gt;By addressing key challenges such as standardization, interoperability, security, and scalability, the Model Context Protocol (MCP) provides a robust foundation for managing the complexities of enterprise AI.&lt;/p&gt;

&lt;p&gt;The path forward depends on industry-wide technical collaboration. As engineering teams implement MCP in production systems, their practical insights will drive protocol refinements and standardization efforts. This collective expertise will be crucial in evolving the protocol to handle increasingly complex AI workflows while maintaining system reliability and performance.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LLMs in Prod: The Reality of AI Outages, No LLM is Immune</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Sat, 14 Dec 2024 09:58:00 +0000</pubDate>
      <link>https://forem.com/portkey/llms-in-prod-the-reality-of-ai-outages-no-llm-is-immune-5h32</link>
      <guid>https://forem.com/portkey/llms-in-prod-the-reality-of-ai-outages-no-llm-is-immune-5h32</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1541701494587-cb58502866ab%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DM3wxMTc3M3wwfDF8c2VhcmNofDExfHxhYnN0cmFjdHxlbnwwfHx8fDE3MzQxNzAxNDJ8MA%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1541701494587-cb58502866ab%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DM3wxMTc3M3wwfDF8c2VhcmNofDExfHxhYnN0cmFjdHxlbnwwfHx8fDE3MzQxNzAxNDJ8MA%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" alt="LLMs in Prod: The Reality of AI Outages, No LLM is Immune" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;Part 2&lt;/strong&gt; of our series analyzing Portkey's critical insights from production LLM deployments. Today, we're diving deep into provider reliability data from &lt;strong&gt;650+ organizations&lt;/strong&gt; , examining outages, error rates, and the real impact of downtime on AI applications. From the infamous OpenAI outage to the daily challenges of rate limits, we'll reveal why 'hope isn't a strategy' when it comes to LLM infrastructure&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 LLMs in Production: Day 3   &lt;/p&gt;

&lt;p&gt;“Hope isn’t a strategy.”&lt;br&gt;&lt;br&gt;
When your LLM provider goes down—and trust us, it will—how ready are you?  &lt;/p&gt;

&lt;p&gt;Today, we’re sharing fresh data from 650+ orgs on LLM provider reliability, downtime strategies, and how to keep things running smoothly (while…&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664054421999811?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before that, here’s a recap from Part 1 of LLMs in Prod:  &lt;/p&gt;

&lt;p&gt;• &lt;a href="https://twitter.com/OpenAI?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@OpenAI&lt;/a&gt; dominance is eroding, with Anthropic slowly but steadily gaining ground&lt;br&gt;&lt;br&gt;
• &lt;a href="https://twitter.com/AnthropicAI?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@AnthropicAI&lt;/a&gt; requests are growing at a staggering 61% MoM&lt;br&gt;&lt;br&gt;
• &lt;a href="https://twitter.com/Google?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@Google&lt;/a&gt; Vertex AI is finally gaining momentum after a rocky start.  &lt;/p&gt;

&lt;p&gt;Now,… &lt;a href="https://t.co/4MjD63EWyJ?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/4MjD63EWyJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664057529934004?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember the OpenAI Outage?  &lt;/p&gt;

&lt;p&gt;In just one day, they reminded the world how critical they are—by taking everything offline for ~4 hours. 😛  &lt;/p&gt;

&lt;p&gt;But here’s the thing: this wasn’t an anomaly.&lt;br&gt;&lt;br&gt;
Outages like these are a recurring pattern across ALL providers.  &lt;/p&gt;

&lt;p&gt;Which begs the question: why… &lt;a href="https://t.co/HYNVeZlSpo?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/HYNVeZlSpo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664061095149964?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📊 Over the past year, error spikes hit every provider—from 429s to 5xxs, no one was spared.  &lt;/p&gt;

&lt;p&gt;The truth?&lt;br&gt;&lt;br&gt;
There’s no pattern, no guarantees, and no immunity.  &lt;/p&gt;

&lt;p&gt;If you’re not prepared with multi-provider setups, you’re inviting downtime.&lt;br&gt;&lt;br&gt;
Reliability isn’t optional—it’s table… &lt;a href="https://t.co/MDpSfSrYft?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/MDpSfSrYft&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664065507516471?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Rate Limit Reality Check:  &lt;/p&gt;

&lt;p&gt;• &lt;a href="https://twitter.com/GroqInc?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@GroqInc&lt;/a&gt; : 21.11%&lt;br&gt;&lt;br&gt;
• &lt;a href="https://twitter.com/PerpLEXIty?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@Perplexity&lt;/a&gt;: 12.24%&lt;br&gt;&lt;br&gt;
• &lt;a href="https://twitter.com/AnthropicAI?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@AnthropicAI&lt;/a&gt; : 5.60%&lt;br&gt;&lt;br&gt;
• &lt;a href="https://twitter.com/Azure?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@Azure&lt;/a&gt; OpenAI: 1.74%  &lt;/p&gt;

&lt;p&gt;Translation: If you're not handling rate limits gracefully, you're gambling with user experience.  &lt;/p&gt;

&lt;p&gt;Your customers won’t wait for infra to catch up. Are you… &lt;a href="https://t.co/GiJwXdPMuQ?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/GiJwXdPMuQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664069097836657?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;But rate limits are just the tip of the iceberg.  &lt;/p&gt;

&lt;p&gt;Server Error (5xx) rates this year:  &lt;/p&gt;

&lt;p&gt;• Groq: 0.67%&lt;br&gt;&lt;br&gt;
• Anthropic: 0.56%&lt;br&gt;&lt;br&gt;
• Perplexity: 0.39%&lt;br&gt;&lt;br&gt;
• Gemini: 0.32%&lt;br&gt;&lt;br&gt;
• Bedrock: 0.28%  &lt;/p&gt;

&lt;p&gt;Even "small" error rates = thousands of failed requests at scale.  &lt;/p&gt;

&lt;p&gt;These aren’t just numbers—they’re… &lt;a href="https://t.co/0CqdEGfYc0?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/0CqdEGfYc0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664075502633452?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So, what’s the solution?  &lt;/p&gt;

&lt;p&gt;The hard truth? Your users don't care why your AI features failed.&lt;br&gt;&lt;br&gt;
They just know you failed.&lt;br&gt;&lt;br&gt;
The key isn’t choosing the “best” provider—it’s building a system that works when things go wrong:  &lt;/p&gt;

&lt;p&gt;💡 Diversify providers.&lt;br&gt;&lt;br&gt;
💡 Implement caching.&lt;br&gt;&lt;br&gt;
💡 Build smart…&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664079873073572?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;6/ Why caching matters:  &lt;/p&gt;

&lt;p&gt;Performance optimization is critical, and here’s where caching delivers results:&lt;br&gt;&lt;br&gt;
• 36% average cache hit rate (peaks for Q&amp;amp;A use cases)&lt;br&gt;&lt;br&gt;
• 30x faster response times&lt;br&gt;&lt;br&gt;
• 38% cost reduction  &lt;/p&gt;

&lt;p&gt;Caching isn't optional at scale—it's your first line of defense. &lt;a href="https://t.co/YX7YvwkmMS?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/YX7YvwkmMS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664082805154072?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That’s it for today! Follow &lt;a href="https://twitter.com/PortkeyAI?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@PortkeyAI&lt;/a&gt; for more on LLMs in Prod Series&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664085879328897?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://t.co/54QiUNDZx2?ref=portkey.ai" rel="noopener noreferrer"&gt;https://t.co/54QiUNDZx2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867664144096539086?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 13, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LLMs In Prod: Day 1</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Fri, 13 Dec 2024 10:08:40 +0000</pubDate>
      <link>https://forem.com/portkey/llms-in-prod-day-1-44oa</link>
      <guid>https://forem.com/portkey/llms-in-prod-day-1-44oa</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7dt7v8bsbmkcf9czfg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7dt7v8bsbmkcf9czfg3.png" alt="LLMs In Prod: Day 1" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;Part 1&lt;/strong&gt; of our analysis diving into Portkey's year-end LLM production data. Over the next few days, we'll be unpacking insights from over &lt;strong&gt;2 trillion tokens&lt;/strong&gt; worth of production data to reveal how the AI ecosystem evolved in 2024.&lt;/p&gt;

&lt;p&gt;Today, we're starting with the most crucial aspect: who's dominating the market, who's growing the fastest, and what's really changing in the LLM landscape.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✨LLMs in Prod Day 1: Provider Trends Unveiled  &lt;/p&gt;

&lt;p&gt;Who’s dominating? Who’s growing the fastest? And what’s really changing in the AI ecosystem?  &lt;/p&gt;

&lt;p&gt;We analyzed 2 trillion tokens worth of our production data to uncover trends that might surprise you. Let’s get into it. 👇&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282238896796141?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;OpenAI: Still Leading, But Watch Out  &lt;/p&gt;

&lt;p&gt;• 24% monthly growth in requests&lt;br&gt;&lt;br&gt;
• 6% monthly growth in organizations  &lt;/p&gt;

&lt;p&gt;OpenAI remains the leader, but here’s the twist: their adoption has dropped from 89% to 76%.  &lt;/p&gt;

&lt;p&gt;Steady dominance? Yes. But competitors are catching up faster than… &lt;a href="https://t.co/jkCsxaUcnn?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/jkCsxaUcnn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282241950486859?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Anthropic: Fastest Growing Provider of 2024  &lt;/p&gt;

&lt;p&gt;• 61% monthly growth in requests&lt;br&gt;&lt;br&gt;
• 22% monthly growth in organizations  &lt;/p&gt;

&lt;p&gt;Anthropic has been on fire. Every time they launch a new Claude model (like Sonnet 3.5, Haiku-3.5), we see big adoption spikes: model releases matter.  &lt;/p&gt;

&lt;p&gt;Anthropic… &lt;a href="https://t.co/KMsLLOLTsy?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/KMsLLOLTsy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282245230248181?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Gemini (Google): Late Start, Big Momentum  &lt;/p&gt;

&lt;p&gt;49% monthly growth in requests&lt;br&gt;&lt;br&gt;
9% growth in new organizations  &lt;/p&gt;

&lt;p&gt;Gemini may have been late to the game, but they’re showing deep usage from those who’ve adopted them.  &lt;/p&gt;

&lt;p&gt;It’s a strong comeback for a Google—Let’s see how Gemini shapes up in… &lt;a href="https://t.co/8DYZReRjar?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/8DYZReRjar&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282248892047766?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cloud Providers: Partnerships Are Key  &lt;/p&gt;

&lt;p&gt;Azure is leading the charge, with 3x more penetration than AWS Bedrock.  &lt;/p&gt;

&lt;p&gt;But here’s the twist:&lt;br&gt;&lt;br&gt;
Bedrock started the year with 10x the adoption of Vertex AI, but by year-end, it’s only 2x ahead.  &lt;/p&gt;

&lt;p&gt;It’s clear now: your AI infrastructure is as… &lt;a href="https://t.co/XcKMK2Delt?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/XcKMK2Delt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282252763455771?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Amazon Bedrock: Fewer Orgs, Deeper Usage  &lt;/p&gt;

&lt;p&gt;13% monthly growth in organizations&lt;br&gt;&lt;br&gt;
91% growth in requests  &lt;/p&gt;

&lt;p&gt;Bedrock isn’t catching up to OpenAI in reach, but when companies use it, they go all in.   &lt;/p&gt;

&lt;p&gt;High usage, fewer orgs—it’s all about depth here. &lt;a href="https://t.co/cH1TInSoJ7?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/cH1TInSoJ7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282256542257656?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Vertex AI: Building Momentum Fast  &lt;/p&gt;

&lt;p&gt;43% monthly growth in requests  &lt;/p&gt;

&lt;p&gt;Vertex AI might’ve started slower, but it’s picking up steam. It’s catching up, just not there yet. &lt;a href="https://t.co/ogKPZ47yhl?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/ogKPZ47yhl&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282260459978826?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Multi-Provider Usage Is on the Rise  &lt;/p&gt;

&lt;p&gt;In just 10 months, the proportion of Portkey orgs using multiple providers jumped from 23% to 40%.  &lt;/p&gt;

&lt;p&gt;Why’s this happening?  &lt;/p&gt;

&lt;p&gt;Redundancy is cheap. Downtime isn’t.&lt;br&gt;&lt;br&gt;
After a year of outages and capacity issues, companies are finally realizing: you… &lt;a href="https://t.co/kGC8T3uVQV?ref=portkey.ai" rel="noopener noreferrer"&gt;pic.twitter.com/kGC8T3uVQV&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282263823561048?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tomorrow: We’ll dive into how these providers actually perform in production. Spoiler alert: the numbers might surprise you. 😉  &lt;/p&gt;

&lt;p&gt;Stay tuned, and follow &lt;a href="https://twitter.com/PortkeyAI?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;@PortkeyAI&lt;/a&gt; for more insights from LLMs in Prod '24.&lt;/p&gt;

&lt;p&gt;— Portkey (@PortkeyAI) &lt;a href="https://twitter.com/PortkeyAI/status/1867282270303793304?ref_src=twsrc%5Etfw&amp;amp;ref=portkey.ai" rel="noopener noreferrer"&gt;December 12, 2024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;lt;!--kg-card-end: html--&amp;gt;&lt;/p&gt;

&lt;p&gt;Find the next post in the series on &lt;a href="https://x.com/PortkeyAI?ref=portkey.ai" rel="noopener noreferrer"&gt;Portkey's Twitter&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Portkey is Joining Hacktoberfest</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Fri, 11 Oct 2024 07:52:05 +0000</pubDate>
      <link>https://forem.com/portkey/portkey-is-joining-hacktoberfest-21nm</link>
      <guid>https://forem.com/portkey/portkey-is-joining-hacktoberfest-21nm</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1vlcpbzywwn01mfzcmza.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1vlcpbzywwn01mfzcmza.png" alt="Portkey is Joining Hacktoberfest" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Portkey today is one of the most popular and performant open source AI Gateways in the market, and the big reason for that is — &lt;strong&gt;&lt;a href="https://portkey.wiki/community?ref=portkey.ai" rel="noopener noreferrer"&gt;the Portkey Community&lt;/a&gt;&lt;/strong&gt;. We're thrilled to give back to the community with Hacktoberfest this year and reward top contributors with amazing prizes!&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Intorudction to Portkey Gateway
&lt;/h3&gt;

&lt;p&gt;Our open source AI Gateway lets you connect, load balance, setup fallbacks and seamlessly manage 250+ AI models using an OpenAI compatible API. It was launched &lt;strong&gt;early this year&lt;/strong&gt; and since then, we've had 40+ contributors adding new providers, guardrails, and fixing bugs every day!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F872tnsfq6p6ips8bkc7z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F872tnsfq6p6ips8bkc7z.gif" alt="Portkey is Joining Hacktoberfest" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project just crossed 6,000 stars on Github ⭐️&lt;/p&gt;

&lt;h3&gt;
  
  
  How You Can Contribute
&lt;/h3&gt;

&lt;p&gt;We are accepting Hacktoberfest contributions for the Gateway repo as well as for its docs!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/Portkey-AI/gateway?ref=portkey.ai" rel="noopener noreferrer"&gt;Portkey Gateway&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Portkey-AI/docs-core?ref=portkey.ai" rel="noopener noreferrer"&gt;Portkey Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Look for issues tagged with &lt;code&gt;hacktoberfest&lt;/code&gt; to find eligible contributions. We're particularly excited about contributions in these areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New guardrails and plugins for our guardrails library&lt;/li&gt;
&lt;li&gt;Integrations with additional LLM providers&lt;/li&gt;
&lt;li&gt;Documentation improvements and fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But don't let that limit you – we welcome contributions across all areas of our projects!&lt;/p&gt;

&lt;h3&gt;
  
  
  Prizes and Recognition
&lt;/h3&gt;

&lt;p&gt;Here's what's in store:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5q2tu8lx4uzpsy60ura.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5q2tu8lx4uzpsy60ura.png" alt="Portkey is Joining Hacktoberfest" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For top contributors:&lt;/strong&gt; A pair of AirPods Pro (2nd Generation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For all contributors with 2+ successful contributions:&lt;/strong&gt; Portkey AI Swag Box with T-shirts and more!&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;New to open source or Portkey? No worries! We've got you covered:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/Portkey-AI/gateway/blob/main/plugins/Contributing.md?ref=portkey.ai" rel="noopener noreferrer"&gt;Guide for Contributing to Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Portkey-AI/gateway/blob/b3ce2cc3d5e9e213c37fc19f25b38dddc54aaec9/.github/CONTRIBUTING.md?ref=portkey.ai#L4" rel="noopener noreferrer"&gt;General Contributing Guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.portkey.ai/?ref=portkey.ai" rel="noopener noreferrer"&gt;Portkey AI Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Support Options
&lt;/h3&gt;

&lt;p&gt;We're here to help you succeed in your contributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://discord.gg/DD7vgKK299?ref=portkey.ai" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;&lt;/strong&gt;: Join our Portkey Discord server for real-time support.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/Portkey-AI/gateway/issues?ref=portkey.ai" rel="noopener noreferrer"&gt;GitHub Issues&lt;/a&gt;&lt;/strong&gt;: Post your questions in the Issues tab of our repo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/Portkey-AI/gateway/blob/main/.github/CONTRIBUTING.md?ref=portkey.ai" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/strong&gt;: Check out our contributor guidelines for detailed information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Remember, to have your PRs count towards Hacktoberfest:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;They must be merged, approved, or tagged with the &lt;code&gt;hacktoberfest-accepted&lt;/code&gt; label.&lt;/li&gt;
&lt;li&gt;Adhere to the &lt;a href="https://hacktoberfest.digitalocean.com/resources/qualitystandards?ref=portkey.ai" rel="noopener noreferrer"&gt;quality standards&lt;/a&gt; to avoid being marked as spam or invalid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ready to get started? Check out our &lt;a href="https://github.com/Portkey-AI?ref=portkey.ai" rel="noopener noreferrer"&gt;GitHub repositories&lt;/a&gt; and join us in making AI development more accessible, reliable, and powerful for everyone!&lt;/p&gt;

&lt;p&gt;Happy Hacking!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How I Optimized My Prompts For E-commerce Search Using DSPy</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Tue, 03 Sep 2024 18:54:54 +0000</pubDate>
      <link>https://forem.com/portkey/dspy-in-production-gb3</link>
      <guid>https://forem.com/portkey/dspy-in-production-gb3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is a guest post by &lt;a href="https://www.linkedin.com/in/ganarajpr/" rel="noopener noreferrer"&gt;Ganaraj&lt;/a&gt;, based on the &lt;a href="https://www.youtube.com/watch?v=_vGKSc1tekE" rel="noopener noreferrer"&gt;talk&lt;/a&gt; he gave at the LLMs in Prod Meetup in Bangalore.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AI has fundamentally changed the way we build apps. I transitioned from being a coder to a creative prompter. This shift from coding to creative prompting might seem like a dream come true. However, the nerd inside me was unhappy.&lt;/p&gt;

&lt;h1&gt;
  
  
  Enter DSPy
&lt;/h1&gt;

&lt;p&gt;DSPy changes this dynamic entirely. Instead of obsessing over prompt crafting, it allows me to focus on what I do best: programming. I'm moving from writing prompts to actually programming AI pipelines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft944aa11916tk4jq33ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft944aa11916tk4jq33ke.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What's DSPy All About?
&lt;/h1&gt;

&lt;p&gt;At its core, DSPy is a framework for optimizing how we work with LLMs. Instead of manually crafting the perfect prompt, DSPy lets us focus on building AI pipelines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You define the flow of your AI program.&lt;/li&gt;
&lt;li&gt;You set up metrics to measure what "good output" looks like for your task.&lt;/li&gt;
&lt;li&gt;DSPy handles the optimization of prompts and weights automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It separates the flow of your program (modules) from the parameter using optimizer (LLM-driven algorithms). Optimizer can tune the prompts and the weights of your LLM calls, based on a metric you want &lt;br&gt;
to maximize.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Don't bother figuring out what special magic combination of words will give you the best performance for your task. Just develop a scoring metric then let the model optimize itself." - Battle at IEEE&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Why This Matters
&lt;/h1&gt;

&lt;p&gt;DSPy stands out in three crucial areas:&lt;/p&gt;

&lt;p&gt;a) &lt;strong&gt;LLM-agnostic&lt;/strong&gt;: You can switch between models without changing the entire system. Moving from GPT-4 to Mistral-7B doesn't mean rewriting my app from scratch.&lt;/p&gt;

&lt;p&gt;b) &lt;strong&gt;Complexity management&lt;/strong&gt;: It breaks down tasks into manageable chunks, each with its own optimization.&lt;/p&gt;

&lt;p&gt;c) &lt;strong&gt;Automated optimizatio&lt;/strong&gt;n: No more manual prompt tweaking&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffiwyvq2ef3hdvmefq9wn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffiwyvq2ef3hdvmefq9wn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"DSPy allowed us to beat GPT-4 performance on this task of extracting data from messy tables, at 10x lower cost per table and 10x lower manual effort" - Gradient AI&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  DSPy in Action: The Zoro UK Case Study
&lt;/h1&gt;

&lt;p&gt;I work as a Lead Architect at Zoro UK, where we've scaled DSPy to production. We use DSPy to solve complex challenges in e-commerce - specifically, normalizing product attributes across millions of items from hundreds of suppliers.&lt;/p&gt;

&lt;p&gt;One of our biggest problems is that we have more than 300 plus suppliers, and they all supply similar kinds of stuff, For example, a simple attribute like thread length can be represented in various ways by different suppliers - some might use '25.4 mm', others '25.4 M', and some might use inches.&lt;/p&gt;

&lt;p&gt;To address this challenge, we (the engineering team) orchestrated a system using DSPy:&lt;/p&gt;

&lt;h2&gt;
  
  
  LLM Sorter Service
&lt;/h2&gt;

&lt;p&gt;At the heart of the system, this service leveraged DSPy's capabilities. It implemented a tiered approach:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A smaller model (e.g., Mistral) for deciding if a set of attribute values needs to be sorted by LLM. In simple cases, we can just go with alpha-numeric sort. So LLM doesn't need to be involved, thereby saving cost.&lt;/li&gt;
&lt;li&gt;A more powerful model (e.g., GPT-4) for complex, nuanced attribute value sorting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj43y7bhxfjay9zvm0zsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj43y7bhxfjay9zvm0zsb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The Attribute Sorting Job extracts raw attribute data from MongoDB.&lt;/li&gt;
&lt;li&gt;The LLM Sorter Service processes these attributes using the appropriate model based on task complexity.&lt;/li&gt;
&lt;li&gt;DSPy's optimization features continuously refine the processing based on defined metrics.&lt;/li&gt;
&lt;li&gt;Processed and standardized attributes are then fed back into MongoDB.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We first started with one model, and then for some use cases, that was not enough. So we just switched it over to OpenAI GPT-4, and it started working as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=_vGKSc1tekE" rel="noopener noreferrer"&gt;Hear more from my recent talk at Portkey's LLMs in Prod event in Bengaluru&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slides:  &lt;a href="https://ggl.link/dspy-in-prod" rel="noopener noreferrer"&gt;https://ggl.link/dspy-in-prod&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Smrthi project with translations produced using DSPy: &lt;a href="https://www.smrthi.com/" rel="noopener noreferrer"&gt;https://www.smrthi.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Awesome DSPy repo: &lt;a href="https://github.com/ganarajpr/awesome-dspy" rel="noopener noreferrer"&gt;https://github.com/ganarajpr/awesome-dspy&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Metrics in DSPy
&lt;/h1&gt;

&lt;p&gt;One of the most intriguing aspects of DSPy is its approach to metrics. Defining the right metric is about more than just accuracy; it's about encapsulating the nuanced goals of your AI system into a quantifiable measure. This process forces clarity of thought that often leads to better system design overall.&lt;/p&gt;

&lt;p&gt;Metrics can range from simple measures like accuracy, exact match, or F1 score to more sophisticated approaches such as cosine similarity or deep eval, depending on the complexity of the task.&lt;/p&gt;

&lt;h1&gt;
  
  
  FAQs with DSPy
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;1) How does DSPy enhance scalability in production?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DSPy's optimizers automatically adapt your pipeline to handle increased data volume and complexity, reducing the need for manual prompt engineering as your system scales.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) What's DSPy's approach to model portability?&lt;/strong&gt;&lt;br&gt;
DSPy allows seamless switching between models (e.g., GPT-4 to Llama 3.1) without rewriting your core logic, crucial for adapting to changing production requirements or cost structures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) How does DSPy help manage costs in large-scale deployments?&lt;/strong&gt;&lt;br&gt;
By optimizing prompts and potentially using smaller models more effectively, DSPy can significantly reduce API calls and associated costs in high-volume production environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) How does DSPy handle performance monitoring and observability in live systems?&lt;/strong&gt;&lt;br&gt;
You can use AI Gateways like Portkey to have an observability layer on top of DSPy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. What's the typical compile-time overhead in a production setting?&lt;/strong&gt;&lt;br&gt;
Compile time varies based on complexity. For reference, a moderately complex program might take anywhere from 5mins-1hr depending on the number of examples and iterations used.&lt;/p&gt;

&lt;h1&gt;
  
  
  What’s next?
&lt;/h1&gt;

&lt;p&gt;For those working on AI systems, especially in production environments, it's time to look at DSPy. The challenges it addresses - scalability, consistency, and adaptability - are only going to become more pressing as AI continues to permeate every aspect of our digital infrastructure. The future of programming isn't about arguing with AI—it's about orchestrating it, and with tools like DSPy, we're well-equipped to lead this transformation.&lt;/p&gt;

</description>
      <category>dspy</category>
      <category>portkey</category>
      <category>llm</category>
      <category>prompts</category>
    </item>
    <item>
      <title>Three Prompt Libraries you should know as an AI Engineer</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Thu, 11 Jul 2024 09:54:15 +0000</pubDate>
      <link>https://forem.com/portkey/three-prompt-libraries-you-should-know-as-a-ai-engineer-32m8</link>
      <guid>https://forem.com/portkey/three-prompt-libraries-you-should-know-as-a-ai-engineer-32m8</guid>
      <description>&lt;p&gt;As developers we write code to develop logic that eventually helps solve larger problems or automate a workflow that is unproductive for humans. &lt;/p&gt;

&lt;p&gt;When LLMs came into picture, prompting obviously became famous. Prompt Engineering became a art! &lt;/p&gt;

&lt;p&gt;Prompting became one of the key components in Generative AI and so the use of prompt libraries. These libraries provide predefined prompts that can be used to train AI models, making the development process more efficient and effective.&lt;/p&gt;

&lt;p&gt;In this Blog, we’ll explore What is a Prompt library, how it boosts our workflow, Is it safe or not? Finally we will take a look at three Prompt Libraries to maximise productivity as an AI Engineer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7w7odhq26jfmdmap458.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7w7odhq26jfmdmap458.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Prompt Library?
&lt;/h2&gt;

&lt;p&gt;A prompt library is not just a repository for prompts; it serves as a powerful solution for collaboration and knowledge sharing within your organisation.&lt;/p&gt;

&lt;p&gt;Prompt libraries provide centralised platforms to store, organise, and access AI prompts, enabling teams to collaborate and streamline workflows. Therefore, the overarching purpose of a prompt library is to improve efficiency, performance, and collaboration. &lt;/p&gt;

&lt;p&gt;It enables your teams to discover and reuse prompts rapidly, avoiding duplicate work and accelerating development cycles. By providing access to highly optimised, pre-tested prompts, a prompt library ensures that the output quality of your projects is consistently high.&lt;/p&gt;

&lt;p&gt;How Prompt libraries boosts your workflow?&lt;/p&gt;

&lt;p&gt;Prompt libraries can significantly streamline AI development by providing ready-to-use prompts that can be easily integrated into your projects. &lt;/p&gt;

&lt;p&gt;Here are some ways prompt libraries can enhance your workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Simplified Task Execution: Prompt libraries provides a collection of predefined prompts that we can use for various tasks such as text generation, sentiment analysis, and more. With this we don’t have to create prompts from the scratch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increased Productivity: Focus on higher-level tasks rather than spending time on prompt creation. This improves the overall productivity of the Team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consistency and Quality: Prompt libraries ensure consistency in the prompts used across different projects. This consistency helps to produce higher quality AI outputs and reduces the chances of errors.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Is it Safe to Use AI Prompt Libraries?
&lt;/h2&gt;

&lt;p&gt;While prompt libraries offer numerous benefits, it is important to consider their safety and reliability. Here are some points we should keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Potential Risks: Using pre-defined prompts may introduce biases or inaccuracies if the prompts are not well-designed. It is crucial to review and test the prompts thoroughly before using them in production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Best Practices: To ensure safe and ethical use of AI prompt libraries, follow best practices such as regularly updating the libraries, validating the prompts, and monitoring the AI outputs for any anomalies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reliability: Choose prompt libraries from reputable sources and communities. This ensures that the prompts are well-maintained and updated regularly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three Prompt Libraries
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/anysphere/priompt" rel="noopener noreferrer"&gt;Priompt&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Priompt is a prompt library designed for creating prompts specifically for large language models (LLMs). It uses JSX syntax, similar to what we use in React development, to structure our prompts.&lt;/p&gt;

&lt;p&gt;Here are some Key Features of Prompt: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSX-based syntax: This makes building prompts more intuitive and easier to read, especially for those familiar with React. &lt;/li&gt;
&lt;li&gt;Priorities: Priompt lets us to define priorities for different parts of your prompt. This helps the LLM determine what information to include in the context window based on its importance. &lt;/li&gt;
&lt;li&gt;Control flow: Components like  enable you to control the flow of information in your prompt. For instance, you can use it to define fallbacks or shorten prompts that become too long.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Priompt aims to streamline the process of designing prompts for LLMs by providing a familiar and structured approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.promptfoo.dev/" rel="noopener noreferrer"&gt;Promptfoo&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Promptfoo is an open-source toolkit designed to help developers improve the performance of large language models (LLMs) through  prompt engineering.&lt;/p&gt;

&lt;p&gt;Here are some of the key features of Prompfoo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Systematic Evaluation: Prompfoo allows us to establish benchmarks and test cases to systematically evaluate the outputs of LLMs. This eliminates the need for time-consuming trial-and-error approaches. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Side-by-Side Comparisons: It enables you to compare the outputs of various prompts and see which ones generate the best results for your specific use case.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatic Scoring: It can automatically score the outputs of LLMs based on the metrics you define. This helps you objectively assess the quality and effectiveness of the LLM's responses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multiple LLM Support: Prompfoo works with a wide range of LLM APIs, including OpenAI, Anthropic, Azure, Google, and HuggingFace.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Prompfoo offers a structured approach to prompt engineering, helping developers build reliable prompts and fine-tune LLMs for their specific applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.prompthub.us/" rel="noopener noreferrer"&gt;PromptHub&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;PromptHub is a platform designed to specifically address prompt testing and evaluation for large language models.&lt;/p&gt;

&lt;p&gt;Here are some of the key features of PromptHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Prompt Collection: Provides a library of pre-built prompts for common Natural Language Processing (NLP) tasks like text summarization, question answering, and code generation. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prompt Testing: Allows you to test your own prompts or those from the library with different LLMs. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Evaluation Metrics: Offers various metrics to assess prompt performance, such as accuracy, relevance, and coherence of LLM outputs. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hyperparameter Tuning: Enables you to experiment with different hyperparameters within a prompt (e.g., wording, examples) to optimize LLM performance. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Collaboration Features: May provide functionalities for sharing prompts and test results with team members (depending on the specific offering).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, PromptHub is a valuable tool for those working with LLMs and prompt engineering. It streamlines the process of testing and evaluating prompts, leading to better-performing LLMs for various NLP tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  To Summarise:
&lt;/h2&gt;

&lt;p&gt;Prompt Libraries play a vital role in enhancing the efficiency and effectiveness of Generative AI App development. By providing ready-to-use prompts, these libraries can simplify tasks, increase productivity, and ensure consistency and quality in AI outputs. &lt;/p&gt;

&lt;p&gt;We at Portkey have been building a &lt;a href="https://github.com/Portkey-AI/gateway" rel="noopener noreferrer"&gt;Open-source AI Gateway&lt;/a&gt; that helps you build a resilient LLM-powered application in production. Join our community of AI practitioners to learn together and share more interesting updates.   &lt;/p&gt;

&lt;p&gt;Happy Building!&lt;/p&gt;

</description>
      <category>generativeai</category>
      <category>prompting</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Stream LLM Responses from Cache</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Wed, 06 Mar 2024 10:38:45 +0000</pubDate>
      <link>https://forem.com/portkey/stream-llm-responses-from-cache-5f5o</link>
      <guid>https://forem.com/portkey/stream-llm-responses-from-cache-5f5o</guid>
      <description>&lt;p&gt;LLMs can become more expensive as your app consumes more tokens. Portkey's AI gateway allows you to cache LLM responses and serve users from the cache to save costs. Here's the best part: now, with streams enabled.&lt;/p&gt;

&lt;p&gt;Streams are an efficient way to work with large responses because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They reduce the perceived latency when users are using your app.&lt;/li&gt;
&lt;li&gt;Your app doesn't have to buffer it in the memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's check out how to get cached responses to your app through streams, chunk by chunk. Every time portkey serves requests from the cache, we save costs for tokens.&lt;/p&gt;

&lt;p&gt;With streaming and caching enabled, we will make a chat completion call to OpenAI through Portkey. &lt;/p&gt;

&lt;p&gt;Import and instantiate the portkey.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Portkey&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;portkey-ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;portkey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Portkey&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORTKEYAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;virtualKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
      &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;semantic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;apiKey&lt;/th&gt;
&lt;th&gt;Sign up for Portkey and copy API key&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;virtualKey&lt;/td&gt;
&lt;td&gt;Securely store in the vault and reference it using Virtual Keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;config&lt;/td&gt;
&lt;td&gt;Pass configurations to enable caching&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Our app will list the tasks to help with planning a birthday party.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You are very good program manager and have organised many events before. You can break every task in simple and means for others to pick it up.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Help me plan a birthday party for my 8 yr old kid?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Portkey follows same signature as OpenAI's, hence enabling streams in responses is passing stream:true option.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;portkey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-3.5-turbo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Errors usually happen:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can iterate over the response object, processing each word (chunk) and presenting it to the user as soon as it's received. &lt;/p&gt;

&lt;p&gt;Here's a tip: You can skip cache HIT by passing cacheForceRefresh&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;portkey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-3.5-turbo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;cacheForceRefresh&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Streaming becomes more effective in providing a smoother user experience and efficiently managing your memory. &lt;/p&gt;

&lt;p&gt;Put this into practice today!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Open Source Models for your next AI use-case</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Wed, 06 Mar 2024 10:35:06 +0000</pubDate>
      <link>https://forem.com/portkey/open-source-models-for-your-next-ai-use-case-4le6</link>
      <guid>https://forem.com/portkey/open-source-models-for-your-next-ai-use-case-4le6</guid>
      <description>&lt;p&gt;Open-source models offer greater control, tools for quality improvement, and cost savings. They are becoming a favored choice for developers to consider for their apps. This blog looks at popular models and the most straightforward way to use them in your apps: by consuming Inference endpoints. &lt;/p&gt;

&lt;p&gt;Inference APIs allow you to generate predictions, decisions, or outputs from a trained AI model. Providers like Anyscale, Perplexity &amp;amp; TogetherAI expose open-source models through Inference endpoints for your apps to make API calls and get responses from LLMs. We will use &lt;a href="https://portkey.ai/docs/api-reference/portkey-sdk-client"&gt;Portkey SDK&lt;/a&gt; to make API calls to inference endpoints since it follows the OpenAI signature, which allows us to easily switch between LLMs by doing find &amp;amp; replace model and endpoint URLs in our app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan a birthday party.
&lt;/h2&gt;

&lt;p&gt;Consider you are building an app that suggests to the user some steps to plan a birthday party. It should give users a checklist of items to take care of to organize a successful birthday party. &lt;/p&gt;

&lt;p&gt;Here's how your implementation might look like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Construct a prompt properly with a suitable system &amp;amp; user query.&lt;/li&gt;
&lt;li&gt;Make an API call to the LLM.&lt;/li&gt;
&lt;li&gt;Transform the response to be suitable for our app.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The control panel would be &lt;a href="https://portkey.ai/"&gt;Portkey&lt;/a&gt;. To avoid managing multiple API keys (Anyscale, Perplexity, and TogetherAI) securely save them to the vault using virtual keys.&lt;/p&gt;

&lt;p&gt;Import portkey-ai and phrase your prompt&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Portkey&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;portkey-ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;portkey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Portkey&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORTKEYAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;virtualKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TOGETHERAI_VIRTUAL_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="c1"&gt;// or Anyscale or Perplexity&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You are very good program manager and have organised many events before. You can break every task in simple and means for others to pick it up. You each step as short as possible. Keep the response under 1000 words.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Help me plan a birthday party?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The chat completions call to llama-2-70b-chat&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;portkey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;togethercomputer/llama-2-70b-chat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will notice &lt;a href="https://portkey.ai/docs/product/observability-modern-monitoring-for-llms/logs"&gt;logs&lt;/a&gt; for every request sent on the portkey’s control panel with useful data such as the timestamp, request type, LLM used, tokens generated, and cost.&lt;/p&gt;

&lt;p&gt;When instantiating the portkey, use virtual keys of different LLM providers, such as Perplexity or Anyscale, to choose one of them. Select any model from these providers and pass its name to make the chat completion call. See the &lt;a href="https://portkey.ai/docs/welcome/readme#ai-providers-supported"&gt;complete list of models supported&lt;/a&gt; through Portkey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inference Engines
&lt;/h2&gt;

&lt;p&gt;Different LLM providers can provide the same model to our applications. For example, Llama 2 is available on Anyscale and TogetherAI. Although they have the same models, their inference engines are different. Inference engines handle all our app's API calls; henceforth, we use inference endpoints. They are optimized for performance and quality. It’s important for you to consider the differences in the Inference engines as you finalize your best-suited model. &lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Suggestion to plan a birthday party? You can choose different LLMs through inference engines of various LLM providers. We explored how query, prompt, LLM, LLM provider, and Portkey make a chat completion call. Have fun experimenting with multiple prompts, language models, and features available now!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>OpenAI Model Deprecation Guide</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Wed, 03 Jan 2024 13:59:47 +0000</pubDate>
      <link>https://forem.com/portkey/openai-model-deprecation-guide-aaj</link>
      <guid>https://forem.com/portkey/openai-model-deprecation-guide-aaj</guid>
      <description>&lt;p&gt;On Jan 4, OpenAI will retire 33 models, including GPT-3 (&lt;code&gt;text-davinci-003&lt;/code&gt;) and various others. This is OpenAI's biggest model deprecation so far. Here's what you need to know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPT-3 Model Retirement&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;text-davinci-003&lt;/code&gt; model (commonly known as &lt;code&gt;GPT-3&lt;/code&gt;) will be unavailable from Jan 4.&lt;br&gt;
→ You must manually transition to the replacement model, &lt;code&gt;gpt-3.5-turbo-instruct&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;/fine-tunes Endpoint Retirement&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;ada&lt;/code&gt;, &lt;code&gt;babbage&lt;/code&gt;, &lt;code&gt;curie&lt;/code&gt;, and &lt;code&gt;davinci&lt;/code&gt; models on the &lt;code&gt;/fine-tunes&lt;/code&gt; endpoint will be retired on Jan 4.&lt;br&gt;
→ You must manually transition to the new endpoint and models, on &lt;code&gt;/fine-tuning&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old Embedding Models Retirement&lt;/strong&gt;&lt;br&gt;
All models except for &lt;code&gt;text-embedding-ada-002&lt;/code&gt; will be shutdown on Jan 4.&lt;br&gt;
→ You must manually transition to the new model &lt;code&gt;text-embedding-ada-002&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No Deprecations for Chat Models&lt;/strong&gt;&lt;br&gt;
All &lt;code&gt;GPT-4&lt;/code&gt; and &lt;code&gt;gpt-3.5-turbo&lt;/code&gt; models remain active. The earliest deprecation is happening on June 13th for &lt;code&gt;gpt-4-0314&lt;/code&gt;, &lt;code&gt;gpt-4-0613&lt;/code&gt;, &lt;code&gt;gpt-3.5-turbo-0613&lt;/code&gt;, &lt;code&gt;gpt-3.5-turbo-0301&lt;/code&gt;. Azure OpenAI will deprecate the &lt;code&gt;-0314&lt;/code&gt; and &lt;code&gt;-0301&lt;/code&gt; models on July 5th. (Azure shutdown for &lt;code&gt;-0613&lt;/code&gt; models is to be announced.)&lt;br&gt;
→ It is recommended to start shifting your &lt;code&gt;gpt-4&lt;/code&gt; and &lt;code&gt;gpt-3.5-turbo&lt;/code&gt; workloads to the newer, cheaper &lt;code&gt;-1106&lt;/code&gt; models.&lt;/p&gt;

&lt;p&gt;We've put all of these updates in a simple-to-understand OpenAI Model Map. (Click on the image to expand)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Chat Models&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YmeoiFVM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rf2nfwfr264z54uznpti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YmeoiFVM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rf2nfwfr264z54uznpti.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Text models &amp;amp; /fine-tunes&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qBnBIysJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2i2kd5ffdz4a3tlrm7j3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qBnBIysJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2i2kd5ffdz4a3tlrm7j3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>openai</category>
      <category>gpt3</category>
      <category>deprecation</category>
      <category>gpt4</category>
    </item>
    <item>
      <title>Find AI Grants, Compute Credits, and Investments</title>
      <dc:creator>Vrushank</dc:creator>
      <pubDate>Wed, 16 Aug 2023 20:51:22 +0000</pubDate>
      <link>https://forem.com/vrv/find-ai-grants-compute-credits-and-investments-35e8</link>
      <guid>https://forem.com/vrv/find-ai-grants-compute-credits-and-investments-35e8</guid>
      <description>&lt;p&gt;Did you know? Over $8 Million USD in investments &amp;amp; credits are up for grabs for early-stage AI builders today.&lt;/p&gt;

&lt;p&gt;But all this information is scattered across the web, making it challenging to track down. On top of that, if you want to check your eligibility for any program, you again have to browse various FAQs, rules (or sometimes even clarifications on Twitter) to make sense of it all.&lt;/p&gt;

&lt;p&gt;We've tried to simplify it for you in the AI Grants Finder. On the tool you can easily browse:&lt;br&gt;
🎖️ Program perks&lt;br&gt;
📝 List of qualifiers&lt;br&gt;
🌍 Accepted countries&lt;br&gt;
📅 Deadlines&lt;br&gt;
all in a single place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check it out here: &lt;a href="https://grantsfinder.portkey.ai/"&gt;https://grantsfinder.portkey.ai/&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Give it a whirl, and if you stumble upon a game-changing program for your builder journey, we'd love to hear about it🙏&lt;/p&gt;

</description>
      <category>ai</category>
      <category>investment</category>
      <category>azure</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
