<?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: Liam Stone</title>
    <description>The latest articles on Forem by Liam Stone (@stonediggity).</description>
    <link>https://forem.com/stonediggity</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%2F629751%2F92999b37-9316-4940-9b43-c8d618cb2f46.png</url>
      <title>Forem: Liam Stone</title>
      <link>https://forem.com/stonediggity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stonediggity"/>
    <language>en</language>
    <item>
      <title>Revolutionizing UI Development with Shadcn v0.dev: The Next Generation of Frontend Tools</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Mon, 30 Sep 2024 10:19:35 +0000</pubDate>
      <link>https://forem.com/stonediggity/httpscdn-images-1mediumcommax30441o0znhwukiy1wcgmys76skqpng-39nc</link>
      <guid>https://forem.com/stonediggity/httpscdn-images-1mediumcommax30441o0znhwukiy1wcgmys76skqpng-39nc</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudcqus5w3fdtnqet6z7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudcqus5w3fdtnqet6z7x.png" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Revolutionizing UI Development with Shadcn v0.dev: The Next Generation of Frontend Tools
&lt;/h2&gt;

&lt;p&gt;The landscape of frontend development is constantly evolving, with new tools and frameworks emerging to simplify and speed up the process of building user interfaces (UI). Among these cutting-edge solutions is Shadcn, a UI library that has recently released its groundbreaking update, v0.dev. This update promises to revolutionize the way developers approach UI creation, offering unparalleled speed, flexibility, and customization.&lt;/p&gt;

&lt;p&gt;Understanding Shadcn: Shadcn is a modern UI library built upon the solid foundation of Radix primitives and Tailwind CSS. Unlike traditional UI libraries that require the import of a large set of pre-built components, Shadcn takes a modular approach. Developers can cherry-pick the specific components they need and copy-paste the code directly into their projects. This à la carte style allows for greater flexibility and easier customization, empowering developers to create UIs that perfectly align with their design vision.&lt;/p&gt;

&lt;p&gt;The Game-Changing Features of Shadcn v0.dev:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;CLI-Based Component Registry: Shadcn v0.dev introduces a powerful CLI-based component registry that streamlines the process of adding components to your project. With simple commands like shadcn add button, developers can instantly integrate fully functional and customizable components into their codebase. This feature eliminates the need for manual searches and copy-pasting, saving valuable time and reducing the risk of errors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI-Powered UI Generation with Vercel V0.dev: One of the most exciting aspects of Shadcn v0.dev is its seamless integration with Vercel’s AI-powered chatbot, V0.dev. This intelligent tool assists developers in generating UI components on-demand. For example, if you require a button for your project, simply ask v0.dev, and it will generate a Tailwind-powered button component based on Shadcn’s predefined patterns. The generated code can be effortlessly installed into your project with a single command, ensuring consistency and quality.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Customization Without Compromise: Shadcn’s design philosophy prioritizes modularity and customization, giving developers the freedom to tailor components to their specific needs. By leveraging Tailwind CSS’s utility-first classes, developers can style components directly within their HTML, without the limitations imposed by rigid design systems. Radix primitives provide a solid and accessible foundation, while still allowing for flexibility in adapting to unique design requirements.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Impact on Frontend Development Workflow
&lt;/h3&gt;

&lt;p&gt;Shadcn v0.dev, combined with AI tools like Vercel v0.dev, revolutionizes the frontend development workflow. What once took hours or even days to build custom UI components can now be accomplished in a matter of minutes. The streamlined process involves identifying the required component, running a Shadcn CLI command to add it to your project, optionally using AI to generate additional styles or functionality, customizing the component with Tailwind or Radix, and sharing or integrating it into your reusable library.&lt;/p&gt;

&lt;p&gt;As the frontend development landscape continues to evolve, tools like Shadcn and Vercel v0.dev are at the forefront of this transformation. Rather than replacing developers, these AI-powered solutions enhance their productivity by automating repetitive tasks and enabling them to focus on creating exceptional user experiences. The future of frontend development lies in the ability to generate robust and customizable UIs rapidly and reliably, and Shadcn v0.dev is leading the charge.&lt;/p&gt;

&lt;p&gt;Shadcn v0.dev represents a significant leap forward in UI development, offering developers an unparalleled combination of speed, flexibility, and customization. By leveraging its modular approach, CLI-based component registry, and integration with AI tools like Vercel v0.dev, developers can build high-quality UIs faster than ever before. Whether you’re working on a personal project or a production-level application, Shadcn v0.dev is a powerful tool that can streamline your workflow and elevate your frontend development experience. Embrace the future of UI development with Shadcn v0.dev and unlock a new era of efficiency and innovation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://v0.dev/chat" rel="noopener noreferrer"&gt;https://v0.dev/chat&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GPT-3.5 Fine Tuning: Unlock the True Potential with This Comprehensive Guide</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Thu, 24 Aug 2023 00:30:40 +0000</pubDate>
      <link>https://forem.com/stonediggity/gpt-35-fine-tuning-unlock-the-true-potential-with-this-comprehensive-guide-boldercloudcomau-fj4</link>
      <guid>https://forem.com/stonediggity/gpt-35-fine-tuning-unlock-the-true-potential-with-this-comprehensive-guide-boldercloudcomau-fj4</guid>
      <description>&lt;p&gt;In today’s digital age, where the art of conversational &lt;a href="https://boldercloud.com.au/an-easy-guide-to-large-language-models-in-2023/" rel="noopener noreferrer"&gt;AI and Large Language Models (LLMs)&lt;/a&gt;is reaching new heights. The GPT-4 model (and it’s big brother &lt;a href="https://chat.openai.com/" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;) stands as a testament to our progress. This remarkable iteration from OpenAI, part of the illustrious ChatGPT lineage, showcases the cumulative learnings from its predecessors and pushes the envelope even further.&lt;/p&gt;

&lt;p&gt;As with all groundbreaking technologies (particularly in AI), there’s always room for improvement. This brings us to the thrilling anticipation of fine-tuning for GPT-3.5. This update promises to amplify the already formidable prowess of GPT-3.5 Turbo, ushering in a new era where customization meets raw computational power. With fine-tuning, GPT-3.5 is expected to achieve a heightened sense of adaptability, catering to more specific tasks while retaining the broad knowledge base it is renowned for.&lt;/p&gt;

&lt;p&gt;As we delve further into the intricacies of fine-tuning, remember that our ultimate goal is to make AI more accessible, efficient, and aligned with your unique needs. Stay tuned for an enlightening journey ahead!&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Fine Tuning?
&lt;/h3&gt;

&lt;p&gt;Fine-tuning represents an answer to some of the most pressing demands of the modern developer community. Let’s delve deeper into the whys of this advancement.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Quest for Customization: Developers’ Call for Model Adaptability
&lt;/h3&gt;

&lt;p&gt;In the dynamic landscape of AI, one size doesn’t fit all. Developers have been on a relentless pursuit for models that not only understand human language at its core but also adapt to unique requirements and contexts. To date this has mostly centred around Retrieval Augmented Generation (RAG). This involves storing and retrieving a custom dataset to inform the context of interactions. Imagine, instead, a language model that could adjust its tone to the playful whimsy of a toy brand or the stern professionalism of a legal firm. That’s the power of customization. Fine-tuning answers this call, offering developers the tools they need to mold AI in alignment with their distinct visions and goals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Early Results: How Fine-Tuning GPT-3.5 Turbo Matches or Surpasses Base GPT-4 Capabilities in Specific Tasks
&lt;/h3&gt;

&lt;p&gt;As impressive as the base GPT-4 model is, early tests have unveiled a tantalizing possibility. When fine-tuned, the GPT-3.5 Turbo can rise to meet, and occasionally even exceed, the base GPT-4’s capabilities in certain narrow tasks. These results are a testament to the potential of fine-tuning. It’s not merely about refining the model; it’s about honing it to such an extent that it achieves performance metrics previously considered unattainable for its tier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Privacy Assurance: Emphasizing OpenAI’s Stance on Data Ownership and Usage
&lt;/h3&gt;

&lt;p&gt;In an era where data privacy concerns are paramount, OpenAI’s stance on the matter is clear and reassuring. With fine-tuning, every piece of data sent in and out of the API remains the sole property of the customer. OpenAI does not utilize this data to train other models, ensuring a firm commitment to user privacy. This data-centric integrity ensures that while developers harness the power of fine-tuning, they can do so with the peace of mind that their data remains uncompromised.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Benefits and Use Cases of Fine Tuning
&lt;/h3&gt;

&lt;p&gt;Delving into the world of AI often feels like navigating a vast ocean of possibilities. And while the immense power and potential of models like GPT-3.5 Turbo are evident, fine-tuning emerges as a beacon that illuminates specific paths within this expansive realm. Let’s dive into the tangible benefits and real-world use cases of fine-tuning, revealing how it’s not just a boon for developers, but a game-changer for businesses and users alike.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improved Steerability: Achieving Better Control and Response Consistency
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; Picture steering a massive ship. The greater control you have over its direction, the smoother and safer the journey. Similarly, in the realm of AI, steerability refers to the ability to guide the model’s responses more precisely, ensuring it behaves as intended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-world application — German Language Prompt:&lt;/strong&gt; Consider an e-commerce platform catering to a German audience. Every query, from product details to customer support, needs a prompt and accurate response in German. With fine-tuning, developers can ensure that whenever the model is prompted in German, it consistently replies in the same language, enhancing user experience and maintaining linguistic coherence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reliable Output Formatting: Importance in Applications and Practical Examples
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; Consistency is key, especially when it comes to tasks that demand specific formatting. Without it, integrating AI outputs into existing systems can be challenging, leading to inefficiencies and potential errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-world application — JSON Snippet Creation:&lt;/strong&gt; Imagine a developer tool that assists in crafting API calls. Users provide a rough idea or request, and the tool generates a well-structured JSON snippet. Fine-tuning ensures that the model’s outputs are formatted consistently, making the conversion from user prompts to usable JSON snippets seamless. This reliable output reduces the overhead for developers and accelerates integration processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Crafting a Custom Tone: Aligning the Model’s Output with Brand Voices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; A brand’s voice is its identity. It’s how businesses communicate their values, ethos, and personality. In an age where AI is becoming an integral part of customer interactions, ensuring that the AI’s tone aligns with the brand’s voice is crucial for maintaining brand integrity and resonance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-world application:&lt;/strong&gt; Take a luxury watch brand known for its legacy and sophisticated elegance. Their communication is often imbued with a sense of timeless grace. Through fine-tuning, the brand can ensure that any AI-driven interaction-be it chat support, email responses, or product descriptions-echoes this refined tone, offering customers a consistent and immersive brand experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In essence, fine-tuning is akin to sculpting. It begins with a robust, powerful model and, through meticulous adjustments, shapes it to fit specific needs and visions. The above benefits and use cases underscore the transformative potential of fine-tuning, bridging the gap between generalized AI capabilities and specialized, high-impact applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fine Tuning Your Own Model
&lt;/h3&gt;

&lt;p&gt;So now that we’ve looked at all the benefits let’s get stuck in to fine tuning our old model. This tutorial will be conducted in NodeJS so you’ll need to have that installed. You can do that by downloading the package and installing &lt;a href="https://nodejs.org/en" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The code for everything that we work through is available at the following &lt;a href="https://github.com/stonediggity/gpt-3.5-fine-tuning-tutorial/tree/main" rel="noopener noreferrer"&gt;Github repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’ll be working in &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt; but have provided the code snippets below which should work no matter what &lt;a href="https://www.codecademy.com/article/what-is-an-ide" rel="noopener noreferrer"&gt;IDE&lt;/a&gt;you are working in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;Let’s start of by making a directory to work in, changing into that directory and initialising a new Node JS project. We’ll then open VS Code in this directory (you should just see a package.json file) and create a new index.js, .env and our training file (we’ll come back to the detail on these shortly):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir gpt-3.5-fine-tuning 
cd gpt-3.5-fine-tuning 
npm init -y 
code . 
New-Item -Path .\index.js -ItemType File 
New-Item -Path .\.env -ItemType File 
New-Item -Path .\style-and-tone.jsonl -ItemType File
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The .env file is where we need to store the API key to be able to access the API and train our custom model. You’ll need to retrieve the key from the settings in your account.&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%2Fcdn-images-1.medium.com%2Fmax%2F882%2F0%2AWoT4aYSaGLXi34Rs.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%2Fcdn-images-1.medium.com%2Fmax%2F882%2F0%2AWoT4aYSaGLXi34Rs.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy this key as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENAI_API_KEY= &amp;lt;YOUR KEY GOES HERE&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we are going to install some dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i openai dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And update our package.json file to include the type “module”. Your final package.json file should look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "64-gpt-3.5-fine-tuning",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" &amp;amp;&amp;amp; exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "dotenv": "^16.3.1",
    "openai": "^4.2.0"
  },
  "type": "module"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let’s look into our style-and-tone.jsonl file. What is happening with this? Basically what goes on here is that we want to train our model to respond in a certain way. This might be official, casual, helpful, annoying, sarcastic… The possibilities truly are endless. So to train the model in this way what we do is provide some sample interactions with the ChatBot in JSON format.&lt;/p&gt;

&lt;p&gt;There are examples of this in the documentation but what I did is just use &lt;a href="https://pub.towardsai.net/gpt-4-code-interpreter-your-magic-wand-for-instant-python-data-visuals-f40fcfb5e39b" rel="noopener noreferrer"&gt;GPT-4 with Code Interpreter&lt;/a&gt; to generate me a sample file. This is the prompt I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"I am creating some training data for fine tuning an ai model. 
This is the sample of what one instance of training looks like. 
I would like 10 instances like this. It needs to be in JSONL format. 
Please make is so that my chatbot always answers in the style of Snoop Dogg. 
{ "messages": [ { "role": "system", "content": 
"You are an assistant that occasionally misspells words" }, 
{ "role": "user", "content": "Tell me a story." }, 
{ "role": "assistant", "content": "One day a student went to schoool." } ] } 
Provide the file for download.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And I was given the data available at this &lt;a href="https://gist.github.com/stonediggity/cacc75ebca43bced1f2f27a12f479895" rel="noopener noreferrer"&gt;Github Gist&lt;/a&gt;! You can see that what has been created is a set of sample interactions where the response is always in the style of Snoop-Dogg (and they are quite amusing to read as well. If you’re creating this data yourself there are some great JSON &lt;a href="https://jsonformatter.curiousconcept.com/" rel="noopener noreferrer"&gt;validators/formatters&lt;/a&gt; that you can use to ensure that your training JSON is correctly formatted.&lt;/p&gt;

&lt;p&gt;NOTE: It’s important to note here that you need AT LEAST 10 examples to fine-tune otherwise you’ll get an error when you go to fine-tune your data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uploading GPT-3.5 Fine Tuning Training Data
&lt;/h3&gt;

&lt;p&gt;Ok so now we are ready to start putting some code into our index.js file. First things first let’s do some imports for the packages that we will need to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import OpenAI from "openai";
import fs from "fs";
import dotenv from "dotenv";
dotenv.config();
const openai = new OpenAI(process.env.OPENAI_API_KEY);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This first bit of code we run at the command line with “node index.js”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;await openai.files.create({ 
  file: fs.createReadStream("style-and-tone.jsonl"), 
  purpose: "fine-tune", 
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we will comment on that section of code and check that the files have been uploaded. Run “node index.js” for your file which should now look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import OpenAI from "openai";
import fs from "fs";
import dotenv from "dotenv";
dotenv.config();
const openai = new OpenAI();

// await openai.files.create({
// file: fs.createReadStream("style-and-tone.jsonl"),
// purpose: "fine-tune",
// });

const files = await openai.files.list();
console.log(files);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect. Now at the console you should see an output which indicates that your training data has been uploaded. You’ll need to retrieve the file ID which is highlighted below (the output coming from the terminal).&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%2Fcdn-images-1.medium.com%2Fmax%2F391%2F0%2AoYAWn0nV6wTDUPLp.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%2Fcdn-images-1.medium.com%2Fmax%2F391%2F0%2AoYAWn0nV6wTDUPLp.png" alt="GPT-3.5 Fine Tuning File Confirmation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Time to Fine-Tune!
&lt;/h3&gt;

&lt;p&gt;Ok! So now let’s comment out that piece of code and we are goign to run the following snippet to fine tune our GPT-3.5 model. We will run “node index.js” on the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import OpenAI from "openai";
import fs from "fs";
import dotenv from "dotenv";
dotenv.config();

const openai = new OpenAI();
const fineTune = await openai.fineTunes
  .create({
    training_file: "file-hJXe81Sn2V7X4EA14K7srsXm",
    model: "gpt-3.5-turbo-0613",
  })
  .catch((err) =&amp;gt; {
    if (err instanceof OpenAI.APIError) {
      console.error(err);
    } else {
      throw err;
    }
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unfortunately it seems as though the SDK is still being updated so although this code SHOULD work you’ll end up with an error on the commmand line with the following message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'Invalid base model: 
gpt-3.5-turbo-0613 (model must be one of ada, babbage, curie, davinci) 
or a fine-tuned model created by your 
organization: org-ebRiZ9NCNAPrrTfR1jKdmsZh'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It seems that the OpenAI SDK may not yet be updated but that’s ok! We can just make a fetch call directly to the API using the following code. I know this is annoying but I just want to highlight the SDK error at the time of writing. Run “node index.js” on the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import OpenAI from "openai";
import fs from "fs";
import dotenv from "dotenv";
dotenv.config();

const requestData = {
  training_file: "file-hJXe81Sn2V7X4EA14K7srsXm",
  model: "gpt-3.5-turbo-0613",
};

const headers = {
  "Content-Type": "application/json",
  Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
};

fetch("https://api.openai.com/v1/fine_tuning/jobs", {
  method: "POST",
  headers: headers,
  body: JSON.stringify(requestData),
})
  .then((response) =&amp;gt; response.json())
  .then((data) =&amp;gt; console.log(data))
  .catch((err) =&amp;gt; console.log(err));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And boom, that is it. We have now submitted our job for fine-tuning. Your command line output should look something like this:&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%2Fcdn-images-1.medium.com%2Fmax%2F547%2F0%2ABEWlmXNppZe073Pk.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%2Fcdn-images-1.medium.com%2Fmax%2F547%2F0%2ABEWlmXNppZe073Pk.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have to wait for an email confirmation stating that our fine tuning job is complete. You will be given a model identifier that you can then use for your API calls in the future.&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%2Fcdn-images-1.medium.com%2Fmax%2F582%2F0%2AmvjDisK8BhOmY9t0.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%2Fcdn-images-1.medium.com%2Fmax%2F582%2F0%2AmvjDisK8BhOmY9t0.png" alt="GPT-3.5-fine-tuning email confirmation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing GPT -3.5 Fine Tuned Model
&lt;/h3&gt;

&lt;p&gt;So the cool thing here is that we can actually test out how our model is working by going into the Open AI playground. Like the other models we can select it and then interact with it. Here is an example of interacting with my fine-tuned SnoopGPT model. You can see that I have had to prompt it to respond like Snoop Dogg, it just does it!&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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2Ayyv0RW5dBd8AVc08.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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2Ayyv0RW5dBd8AVc08.png" alt="GPT-3.5-fine-tuning-test"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is definitely a silly example but you can see how our model is starting to emulate some of the Snoop lingo. This is with a mere ten training examples but you can see that the more examples with high quality is going to generate some pretty good responses for us.&lt;/p&gt;

&lt;p&gt;If you’re interested in more detail on fine tuning checkout the original post from OpenAI &lt;a href="https://openai.com/blog/gpt-3-5-turbo-fine-tuning-and-api-updates" rel="noopener noreferrer"&gt;here&lt;/a&gt;. There is more detail in the docs about GPT-3.5 Fine Tuning from a technical perspective as well as details on the costs.&lt;/p&gt;

&lt;h3&gt;
  
  
  All-Up GPT-3.5 Fine Tuning
&lt;/h3&gt;

&lt;p&gt;The digital realm is teeming with tools, technologies, and potentialities. Among them, AI has always been a beacon of transformative power. However, the real beauty of such advanced tools like LLMs and the GPT models doesn’t merely lie in their vast capabilities, but in the promise of molding them to our unique visions and needs. This is the essence of fine-tuning-taking the robustness of generalized AI and tailoring it with precision to resonate with specific voices, tones, and tasks.&lt;/p&gt;

&lt;p&gt;The journey we embarked on in this tutorial-crafting a model to echo the unmistakable vibes of Snoop Dogg-is emblematic of this promise. It’s not just about technical achievement; it’s a testament to the creative agency we wield in the age of AI. Although a simple example we can see with the power of fine-tuning, developers aren’t just passive users but active sculptors, shaping AI’s vast potential to resonate with specific cultural icons, brand voices, or even individual quirks.&lt;/p&gt;

&lt;p&gt;If you’re look for assistance on customising models &lt;a href="http://boldercloud.com.au" rel="noopener noreferrer"&gt;BolderCloud&lt;/a&gt;can help. We love working with web and AI solutions. Check out our &lt;a href="http://boldercloud.com.au/services" rel="noopener noreferrer"&gt;services&lt;/a&gt;here and enjoy!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://boldercloud.com.au/gpt-3-5-fine-tuning-unlock-the-true-potential-with-this-comprehensive-guide/" rel="noopener noreferrer"&gt;&lt;em&gt;https://boldercloud.com.au&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on August 24, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>llm</category>
      <category>finetuning</category>
      <category>ai</category>
    </item>
    <item>
      <title>Pioneering AI Content Creation: Must Know Tools Every Creator Needs</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Sun, 20 Aug 2023 22:53:47 +0000</pubDate>
      <link>https://forem.com/stonediggity/pioneering-ai-content-creation-must-know-tools-every-creator-needs-2211</link>
      <guid>https://forem.com/stonediggity/pioneering-ai-content-creation-must-know-tools-every-creator-needs-2211</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--um03vo33--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2Ak8YVoQ_sWpSvrSbdPmuROA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--um03vo33--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2Ak8YVoQ_sWpSvrSbdPmuROA.png" alt="" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the blink of an eye, the digital world has undergone a metamorphosis. From the days of static web pages and one-way communication, we’ve transitioned into an era where interactivity, personalization, and automation reign supreme. Central to this transformation is the rise of Artificial Intelligence (AI) and &lt;a href="https://boldercloud.com.au/an-easy-guide-to-large-language-models-in-2023/"&gt;Large Language Models&lt;/a&gt; in AI content creation. No longer confined to the realms of science fiction, AI is now a tangible force, driving innovation and redefining the boundaries of what’s possible.&lt;/p&gt;

&lt;p&gt;Amidst this digital renaissance, it can be difficult to navigate the ins and outs especially when it comes to incorparating AI into &lt;a href="https://boldercloud.com.au/modern-web-five-must-know-development-trends/"&gt;web development&lt;/a&gt;. To harness the power of AI, changes not just the way content is created, but to elevates it, ensuring your services resonate, engage, and inform.&lt;/p&gt;

&lt;p&gt;As we embark on this journey together, let’s delve deeper into the world of AI-driven content creation. We will explore the tools and techniques that are setting the stage for the future and changing the &lt;a href="https://boldercloud.com.au/seo-vs-ppc-showdown-a-guide-to-ultimate-web-dominance/"&gt;SEO&lt;/a&gt;and copywriting landscape.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Significance of AI in Content Creation
&lt;/h3&gt;

&lt;p&gt;Content creation, in its traditional form, has always been a labor of love. Writers, designers, and creators have poured hours into crafting messages that resonate, visuals that captivate, and narratives that engage. Yet, despite the passion and dedication, traditional content creation has faced its fair share of challenges. Deadlines loom large, the demand for fresh content is relentless. The quest for originality can sometimes feel like a never-ending marathon.&lt;/p&gt;

&lt;p&gt;Enter Artificial Intelligence, a game-changer in the truest sense. With AI Content Creation, the landscape of copywriting is undergoing a seismic shift. Here’s the promise AI brings to the table:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency:&lt;/strong&gt; Gone are the days of laborious manual research, repetitive tasks, and time-consuming edits. AI streamlines the process, automating tasks that once took hours, if not days. The result? Faster turnaround times and the ability to produce more content without compromising on quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality:&lt;/strong&gt; AI doesn’t just speed up the process; it enhances it. With advanced algorithms and deep learning, AI tools can generate content that’s not only grammatically correct but also contextually relevant. It’s like having an editor, researcher, and writer rolled into one, ensuring the content is top-notch every single time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Innovation:&lt;/strong&gt; Perhaps the most exciting aspect of AI in content creation is the innovation it fosters. From personalized content recommendations to interactive chatbots and dynamic content adjustments based on user behavior, AI is pushing the boundaries of what’s possible, offering experiences that were once the stuff of dreams.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In essence, while traditional content creation laid the foundation, AI content creation is building upon it, brick by brick, creating structures that are more robust, more innovative, and more in tune with the needs of today’s digital audience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Five Must Know AI Content Creation Tools
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Jasper
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.jasper.ai/"&gt;Jasper&lt;/a&gt;stands as a beacon in the realm of AI content generators. With an arsenal of over 52 templates catering to both short and long-form content, it’s a tool designed for versatility. Whether you’re crafting an engaging Instagram caption, diving into blog posts, scripting videos, designing campaign assets, or even penning down a personal bio, Jasper is your go-to solution.&lt;/p&gt;

&lt;p&gt;The “Blog Post Intro” feature of Jasper is a boon for writers grappling with the initial hurdles of content creation. By simply feeding Jasper the core idea of your article, you’re presented with a crafted introduction. This serves as a launchpad for the rest of your content. But Jasper’s brilliance doesn’t stop at templates. Recognizing the challenges of integrating AI into workflows, Jasper offers a plethora of training resources, ensuring users can harness its full potential seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; Jasper’s pricing is as flexible as its features, starting at $39/mo for the Creator plan, extending to custom-tailored Business plans for those seeking enterprise-level solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Copysmith
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://copysmith.ai/"&gt;Copysmith&lt;/a&gt; (now with their E-commerce producrt Describely), tailored for brands and businesses, is a powerhouse of AI content creation. With over 30 diverse templates, ranging from Facebook Ad copy to Event Press Releases. Yt’s a tool that understands the varied content needs of today’s digital landscape.&lt;/p&gt;

&lt;p&gt;Copysmith isn’t just about creating content; it’s about organizing it. The ability to categorize content into folders ensures streamlined workflows. And for those keen on a test drive, Copysmith offers a 3-day free trial. The cherry on top? The Copysmith Chrome extension and the upcoming collaborative features, set to redefine team-based content creation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; Starting at a competitive $19, Copysmith ensures quality doesn’t break the bank. And for those still on the fence, the 3-day free trial is a tempting offer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Writesonic
&lt;/h3&gt;

&lt;p&gt;Overview and Unique Selling Points: Writesonic, an AI-driven copywriting tool, is on a mission: to craft content that doesn’t just engage but also drives results. With a dual offering of templates, it caters to both copywriters and long-form content enthusiasts.&lt;/p&gt;

&lt;p&gt;The Blend of Automation and Creativity: From crafting compelling landing pages to drafting blog posts, Writesonic is the bridge between automation and creativity. And for those not ready for a full commitment, the free trial and Pay-As-You-Go credit system offer a flexible entry point.&lt;/p&gt;

&lt;p&gt;Pricing: With plans starting at $15/month and a free trial for newcomers, Writesonic ensures quality content is accessible to all.&lt;/p&gt;

&lt;h3&gt;
  
  
  ChatGPT
&lt;/h3&gt;

&lt;p&gt;December 2022 marked the arrival of ChatGPT, and the digital world hasn’t been the same since. Its user-friendly chat interface democratizes AI, making it accessible to all. But ChatGPT is more than just a chatbot; it’s a multi-faceted tool, capable of generating both text and code.&lt;/p&gt;

&lt;p&gt;The Future of AI-driven Conversations: Dubbed the “everything” app, ChatGPT’s versatility is its strength. However, its broad spectrum means it’s not always tailored for specific B2B use cases, making the content creation journey a tad unpredictable at times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; ChatGPT’s free tier offers a taste of the GPT-3.5 capabilities. For those seeking more, ChatGPT Plus, priced at $20/mo, unlocks the power of GPT-4 and a plethora of other features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Article Forge
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.articleforge.com/"&gt;Article Forge&lt;/a&gt; is where deep learning meets content creation. In under a minute, it crafts SEO-optimized content, complete with subheadings, images, videos, and links, all driven by your provided keyword.&lt;/p&gt;

&lt;p&gt;The Art and Science of Automated Content Crafting: With an intuitive interface, Article Forge ensures customization is at the user’s fingertips. From adjusting article length to integrating secondary keywords, it’s all about crafting content that ranks. And for those targeting a global audience, the ability to generate content in seven foreign languages is a game-changer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt; : Priced at $57/month (or $27/month when billed annually), Article Forge offers value for money. And with a 5-day free trial and a 30-day money-back guarantee, it’s a risk-free investment in quality content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keyword Integration in AI Content Creation
&lt;/h3&gt;

&lt;p&gt;The Art of Weaving Primary and Secondary Keywords: In the tapestry of content creation, keywords serve as the vibrant threads that bring the entire piece to life. But it’s not just about having them; it’s about how they’re integrated. Primary keywords, being the focal point, need to be strategically placed, ensuring they catch the reader’s eye (and search engine’s algorithm). Secondary keywords, on the other hand, should be seamlessly woven throughout, enhancing the narrative without overpowering it.&lt;/p&gt;

&lt;p&gt;Balancing User Engagement with SEO Optimization: It’s a delicate dance. On one hand, we have the ever-evolving algorithms of search engines, and on the other, the dynamic preferences of our readers. Striking a balance is crucial. While keywords act as the bridge to visibility in search results, the content’s quality and relevance determine user engagement. It’s about crafting content that not only ranks but also resonates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making Content Engaging and Reader-Friendly
&lt;/h3&gt;

&lt;p&gt;Stories have a way of sticking. By grounding our content in real-world examples, we make it relatable. It’s one thing to state a fact, but illustrating it with a tangible example amplifies its impact, making the content memorable and persuasive.&lt;/p&gt;

&lt;p&gt;In an age of dwindling attention spans, interactivity is the key to engagement. Be it infographics, polls, quizzes, or even simple clickable CTAs, interactive elements invite the reader to participate, transforming passive consumption into an active experience.&lt;/p&gt;

&lt;p&gt;Every reader approaches content with a set of concerns or reservations. Anticipating these and addressing them head-on establishes credibility. It’s about building a conversation with the reader, acknowledging their concerns, offering solutions, and guiding them towards a conclusion.&lt;/p&gt;

&lt;p&gt;With the right blend of keyword integration and engaging elements, AI content creation and it’s outputs can transcend from being just words on a page to a compelling narrative that informs, engages, and inspires.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI Content Creation — All Up
&lt;/h3&gt;

&lt;p&gt;As we stand on the cusp of a new era, the landscape of content creation is shimmering with possibilities, largely driven by the advancements in AI. Gone are the days when content was a mere assembly of words. Today, with AI tools at our disposal, content is evolving into a dynamic entity, adapting in real-time, personalizing user experiences, and offering insights that were once beyond reach.&lt;/p&gt;

&lt;p&gt;In this rapidly changing scenario, &lt;a href="https://boldercloud.com.au"&gt;BolderCloud&lt;/a&gt;emerges not just as a spectator but as a trailblazer. Our vision is clear: to harness the power of AI, not to replace human creativity, but to augment it. We believe in a future where AI and human ingenuity coexist, complementing each other, leading to content that’s not just optimized for algorithms but also resonates with the human heart.&lt;/p&gt;

&lt;p&gt;Our commitment is unwavering. As pioneers in the field, BolderCloud is dedicated to pushing the boundaries, exploring uncharted territories, and bringing to the fore innovations that redefine content creation. We’re not just adapting to the future; we’re shaping it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://boldercloud.com.au/pioneering-ai-content-creation-must-know-tools-every-creator-needs/"&gt;&lt;em&gt;https://boldercloud.com.au&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on August 20, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>content</category>
      <category>chatgpt</category>
      <category>llm</category>
    </item>
    <item>
      <title>What is Pseudocode? Unveiling the Blueprint Behind Powerful Web Development! — boldercloud.com.au</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Thu, 10 Aug 2023 01:11:50 +0000</pubDate>
      <link>https://forem.com/stonediggity/what-is-pseudocode-unveiling-the-blueprint-behind-powerful-web-development-boldercloudcomau-2app</link>
      <guid>https://forem.com/stonediggity/what-is-pseudocode-unveiling-the-blueprint-behind-powerful-web-development-boldercloudcomau-2app</guid>
      <description>&lt;h3&gt;
  
  
  What is Pseudocode? Unveiling the Blueprint Behind Powerful Web Development!
&lt;/h3&gt;

&lt;p&gt;In the vast landscape of &lt;a href="https://boldercloud.com.au/modern-web-five-must-know-development-trends/"&gt;web development&lt;/a&gt;, understanding the intricacies of a problem and devising a strategy for its solution is pivotal. Imagine, for a moment, an artist standing before a blank canvas. Before the first drop of paint touches the surface, they might create rough sketches, outline their thoughts, and plan their masterpiece. Similarly, in the world of coding, there’s a foundational tool that acts as that preliminary sketch — pseudocode. Much like those rudimentary sketches guide artists, pseudocode is to developers what these initial designs are to them.&lt;/p&gt;

&lt;p&gt;For newcomers and seasoned professionals alike, the value of pseudocode can’t be stressed enough. Whether you’re building a simple webpage for a local business or orchestrating an intricate, data-driven application for a brand like &lt;a href="https://boldercloud.com.au"&gt;&lt;strong&gt;BolderCloud&lt;/strong&gt;&lt;/a&gt;, pseudocode is key. It’s more than just scribbling down thoughts; it’s about understanding the heart of a problem and charting the path to its solution.&lt;/p&gt;

&lt;p&gt;In this voyage through the essence of pseudocode, we’ll uncover its magic and practical applications. Join us as we delve deep into what pseudocode.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Exactly is Pseudocode?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  A Definition
&lt;/h3&gt;

&lt;p&gt;At its core, &lt;a href="https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/#:~:text=Pseudo%20code%20is%20a%20term,up%20representation%20of%20an%20algorithm."&gt;pseudocode&lt;/a&gt; is a high-level description of an algorithm or a program’s functionality. It is a bridge between human language and computer language. A tool that translates our thought processes into steps that a machine might take, albeit not in any specific coding language. Instead of getting bogged down in the nuances of syntax and semantics, the focus shifts to the logic and flow of operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Universality
&lt;/h3&gt;

&lt;p&gt;One of the most salient features of pseudocode is its universality. It’s not penned down in the dialect of &lt;a href="https://www.w3schools.com/java/java_intro.asp"&gt;Java&lt;/a&gt;,&lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt;, &lt;a href="https://nodejs.org/en"&gt;Node.js&lt;/a&gt;, or any other specific language. Alternatively, it’s a neutral, language agnostic medium, that allows developers to express their ideas without getting tied down by the quirks and constraints of any particular programming environment. This means whether you’re a web developer at BolderCloud or a novice just dipping your toes in the vast ocean of coding, pseudocode serves as a lingua franca for all.&lt;/p&gt;

&lt;h3&gt;
  
  
  Breaking Down Complex Problems
&lt;/h3&gt;

&lt;p&gt;Every developer, at some point, faces that formidable, seemingly insurmountable problem. It’s a maze, a puzzle, a riddle wrapped in an enigma. This is where pseudocode truly shines. By converting these intricate challenges into smaller, digestible steps, pseudocode ensures you don’t lose sight of the forest for the trees. It’s akin to a mountain climber plotting their route up a steep peak, identifying each ledge, crevice, and foothold. With each line of pseudocode, developers can visualize the journey ahead, breaking down daunting tasks into actionable, manageable milestones.&lt;/p&gt;

&lt;p&gt;In essence, pseudocode stands at the nexus of clarity and creativity, offering a bird’s eye view of a project, ensuring that before we dive deep into the world of ones and zeroes, we have a roadmap, a compass, guiding us towards our destination.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Value of Pseudocode in Web Development
&lt;/h3&gt;

&lt;p&gt;The digital realm is a dynamic landscape, where the pace is swift, and the challenges are ever-evolving. In the heart of this bustling environment, web developers are constantly on the lookout for tools and methodologies to streamline their workflow. Enter pseudocode. But what makes pseudocode an indispensable asset in the world of web development? Let’s delve deeper.&lt;/p&gt;

&lt;h3&gt;
  
  
  Speeding up the Coding Process
&lt;/h3&gt;

&lt;p&gt;The old adage “measure twice, cut once” holds remarkably true for web development. Before diving headlong into coding, laying out the groundwork with pseudocode can significantly expedite the actual coding phase. With a clear plan in place, developers can quickly identify which parts of the code they need to focus on, which libraries or frameworks might be required, and how different components will interact. This foresight ensures that when the fingers start dancing on the keyboard, they do so with purpose and precision, making the coding process far more efficient.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improving Clarify and Team Communication
&lt;/h3&gt;

&lt;p&gt;Web development isn’t a solo endeavor. It’s a collaborative dance, often involving designers, frontend developers, backend specialists, and sometimes even content creators. Pseudocode serves as a universal script that everyone on the team can understand. Instead of getting lost in technical jargon or the intricacies of a specific language, team members can discuss, debate, and brainstorm using pseudocode as a common ground. It ensures that everyone, irrespective of their role or expertise, is on the same page, fostering an environment of clear communication and collaborative synergy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Providing a Clear Roadmap
&lt;/h3&gt;

&lt;p&gt;Mistakes, while natural, can be costly in web development. A single oversight can sometimes lead to hours of debugging or even compromise the functionality of an entire application. Pseudocode, in this context, acts as a safety net. By mapping out the logic, flow, and structure of a program beforehand, developers get a holistic view of the project. They can anticipate potential pitfalls, identify logical inconsistencies, and rectify them before they morph into actual coding errors. In essence, pseudocode serves as a lighthouse, guiding developers away from the treacherous shores of bugs and glitches, ensuring a smoother sail towards the final product&lt;/p&gt;

&lt;p&gt;In the fast-paced realm of web development, where time is of the essence and precision is paramount, pseudocode emerges not just as a tool, but as a trusted ally. It is the bridge between ideation and implementation, ensuring that the journey from concept to code is smooth, efficient, and error-free.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Simple Example: The Temperature Converter
&lt;/h3&gt;

&lt;p&gt;The essence of pseudocode lies in its simplicity, and there’s no better way to grasp its utility than by walking through an example. Let’s break down a basic task that many of us have encountered at some point: converting a temperature value from Fahrenheit to Celsius.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pseudocode:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Start
2. Input temperature in Fahrenheit as "tempF"
3. Calculate Celsius value: (tempF - 32) * 5/9 = "tempC"
4. Display "tempC" to the user
5. End
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s decode this step-by-step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start:&lt;/strong&gt; This signifies the beginning of our process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input temperature in Fahrenheit as “tempF”:&lt;/strong&gt; Here, we’re prompting the user to provide us with a temperature value in Fahrenheit which we’ll refer to as “tempF” for the rest of the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calculate Celsius value:&lt;/strong&gt; The formula to convert Fahrenheit to Celsius is (Fahrenheit - 32) * 5/9. This step does the math for us.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Display “tempC” to the user:&lt;/strong&gt; Once we’ve got our converted value, it’s time to present it to the user. Whether this is on a screen, printed on a piece of paper, or any other form of output, the end result is that the user gets to see the temperature in Celsius.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End:&lt;/strong&gt; This indicates that our process has concluded.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To translate our pseudocode into a practical application, let’s use Node.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout }); 

readline.question('Please enter the temperature in Fahrenheit: ', (tempF) =&amp;gt; { let tempC = (parseFloat(tempF) - 32) * 5/9; 

console.log(`The temperature in Celsius is: ${tempC.toFixed(2)}°C`); 

readline.close(); });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we have here is a simple Node.js script that prompts the user to enter a temperature value in Fahrenheit. Once inputted, it applies the formula to convert this value to Celsius and then displays the result back to the user.&lt;/p&gt;

&lt;p&gt;From the pseudocode’s conceptual clarity to the Node.js script’s actionable execution, we witness the seamless transition from idea to implementation. The journey underscores the power of pseudocode in bridging the gap between concept and code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making it Real: Node.js Implementation
&lt;/h3&gt;

&lt;p&gt;While our previous example provided a rudimentary CLI-based approach, web applications in the modern age are about interactivity, and what better way to understand pseudocode’s translation into reality than by setting up a real-time Node.js server? In this section, we’ll walk through how to convert a Fahrenheit temperature into Celsius via an API endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting up a basic Node.js server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before you capture or send data, you need to set up a server to listen to incoming requests. Create a simple index.js or server.js to run your server. You’ll need to install the express package for this which makes running server easy!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express'); 

const app = express(); 

const PORT = 3000; 

app.listen(PORT, () =&amp;gt; { console.log(`Server is running on http://localhost:${PORT}`); });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we’re utilizing Express, a fast, unopinionated, minimalist web framework for Node.js. This tiny snippet creates a new Express application and sets it up to listen on port 3000.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Capturing the Fahrenheit temperature via an API endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We need a mechanism to accept the Fahrenheit value from the user, and for that, we’ll set up an API endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.use(express.json()); 

// This middleware is used to parse JSON bodies app.post('/convert', (req, res) =&amp;gt; { const { fahrenheit } = req.body; 

if (!fahrenheit) { return res.status(400).send("Please provide a Fahrenheit value."); } 

// ... More code to come ... });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code, we defined a POST endpoint /convert that anticipates a Fahrenheit value in the body of the request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementing the formula for conversion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s now integrate our conversion formula into the endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const celsius = (fahrenheit - 32) * 5/9;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sending back the converted Celsius value as a response&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, once we’ve converted the Fahrenheit value to Celsius, it’s time to send this value back to the user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;res.json({ celsius: celsius.toFixed(2) });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s how our complete endpoint looks after integrating all the steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.post('/convert', (req, res) =&amp;gt; { const { fahrenheit } = req.body; 

if (!fahrenheit) { return res.status(400).send("Please provide a Fahrenheit value."); } 

const celsius = (fahrenheit - 32) * 5/9; 

res.json({ celsius: celsius.toFixed(2) }); });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this setup, you have a functional Node.js server that listens for temperature conversion requests and responds with the corresponding Celsius value. The journey from pseudocode to a working API not only clarifies the abstraction layers in software development but also showcases the significance of having a structured blueprint before diving into coding. Your completed server.js (or index.js) will look as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Dependencies const express = require('express'); 

// Create an instance of the Express app 
const app = express(); 

// Define the port for our server to listen on 
const PORT = 3000; 

// Middleware to parse JSON requests 
app.use(express.json()); 

// POST endpoint to receive the Fahrenheit value and return the Celsius value 
app.post('/convert', (req, res) =&amp;gt; { const { fahrenheit } = req.body; 

// Check if Fahrenheit value was provided 
if (!fahrenheit) { return res.status(400).send("Please provide a Fahrenheit value."); } 

// Convert Fahrenheit to Celsius 
const celsius = (fahrenheit - 32) * 5/9; 
// Return the converted value 
res.json({ celsius: celsius.toFixed(2) }); }); 

// Start the server and listen on the defined port 
app.listen(PORT, () =&amp;gt; { console.log(`Server is running on http://localhost:${PORT}`); });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you run this file with node it will spin up a local express server that you can make endpoint calls to using frontend clients like &lt;a href="https://www.postman.com/"&gt;Postman&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The journey from a raw idea to a fully functional web application often winds through a myriad of complexities. As we’ve delved into today, pseudocode stands as a lighthouse amid these intricacies, offering clarity and direction. Much like an architect wouldn’t dare construct without a blueprint or a chef without a recipe, web developers gain immeasurable benefits from initiating their coding projects with well-thought-out pseudocode.&lt;/p&gt;

&lt;p&gt;While tools, languages, and frameworks might evolve, the essence of problem-solving remains consistent. Pseudocode transcends the nuances of languages and taps directly into this core, allowing developers to define the logic and flow of their application in a lucid, structured manner. It’s this preliminary step that often makes the difference between a smooth development process and one riddled with confusions and frequent backtracking.&lt;/p&gt;

&lt;p&gt;If there’s one takeaway from our exploration today, let it be this: The scale or scope of your project doesn’t determine the need for pseudocode. Whether you’re creating a simple website or an intricate AI-driven application for “BolderCloud”, the foundational step of drafting your thoughts can be the difference between success and frustration.&lt;/p&gt;

&lt;p&gt;So, as you embark on your next web development adventure, whether with BolderCloud or on a personal venture, take a moment. Lay out your steps, visualize the process, and draft your pseudocode. You might just find that the roadmap you create guides you more effectively than any tool or framework ever could. Dive into your next challenge with confidence, starting with the powerful simplicity of pseudocode.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://boldercloud.com.au/what-is-pseudocode-unveiling-the-blueprint-behind-powerful-web-development/"&gt;&lt;em&gt;https://boldercloud.com.au&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on August 10, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdesignanddevelopm</category>
      <category>node</category>
      <category>pseudocode</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Get Started: Must Know Website Builders for 2023 </title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Fri, 04 Aug 2023 06:12:25 +0000</pubDate>
      <link>https://forem.com/stonediggity/get-started-must-know-website-builders-for-2023-boldercloudcomau-4ll1</link>
      <guid>https://forem.com/stonediggity/get-started-must-know-website-builders-for-2023-boldercloudcomau-4ll1</guid>
      <description>&lt;h3&gt;
  
  
  Get Started: Must Know Website Builders for 2023 — boldercloud.com.au
&lt;/h3&gt;

&lt;p&gt;In today’s digital world, having a professional-looking website is crucial for any business to succeed online. Keeping up with &lt;a href="https://boldercloud.com.au/modern-web-five-must-know-development-trends/"&gt;devlopment trends&lt;/a&gt; is a tough gig and not everyone has the technical expertise required to build a website from scratch. This is where &lt;a href="https://www.pcmag.com/picks/the-best-website-builders"&gt;website builders&lt;/a&gt; come in handy. Website builders empower anyone to create stunning websites without needing to know coding or advanced web development skills. With so many options to choose from, it can be overwhelming to decide which website builder is the best fit for your needs in 2023. In this blog post, we will take a look at five of the top website builders you should consider using this year.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wix
&lt;/h3&gt;

&lt;p&gt;With over &lt;a href="https://www.wix.com/about/us"&gt;240 million users&lt;/a&gt; across 190 countries, &lt;a href="https://www.wix.com/"&gt;Wix&lt;/a&gt; is undoubtedly one of the most widely used website builders globally. Wix provides an intuitive drag-and-drop editor that allows you to create fully-functional websites within minutes. All you need to do is pick from their collection of thousands of designer-made templates and customize them using Wix’s user-friendly platform.&lt;/p&gt;

&lt;p&gt;Wix is ideal for small businesses, online stores, portfolios, and blogging sites. It offers a free basic plan, but this includes Wix branding and limited features. To remove Wix ads and access more advanced functionality like connecting your own custom domain, you’ll need to upgrade to one of their premium paid plans.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HgNSCoQ1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AXGh7jiVMSwCHo4O4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HgNSCoQ1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AXGh7jiVMSwCHo4O4.jpg" alt="" width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Squarespace
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.squarespace.com/"&gt;Squarespace&lt;/a&gt; is a popular website builder known for its beautiful, elegant templates. It’s especially great for creative professionals like photographers, artists, designers, and writers.&lt;/p&gt;

&lt;p&gt;Squarespace makes it easy to customize any template by letting you seamlessly inject your own text, images, videos, and more. Reordering or deleting content blocks is simple. Squarespace also provides built-in e-commerce capabilities, so you can easily sell products or services through your site.&lt;/p&gt;

&lt;p&gt;While Squarespace’s pricing plans are slightly more expensive than competitors, they offer advanced features and functionality that justify the extra cost. Squarespace also provides award-winning 24/7 customer support.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shopify
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.shopify.com/"&gt;Shopify&lt;/a&gt; is the best website builder for anyone wanting to launch an online retail store. It powers over 1 million businesses globally across 175 countries.&lt;/p&gt;

&lt;p&gt;No matter what stage your &lt;a href="https://www.bigcommerce.com/articles/ecommerce/best-ecommerce-website-design/"&gt;e-commerce&lt;/a&gt; business is at, Shopify offers the tools and functionality to build and manage a successful online store. All Shopify plans, even at the basic level, come with integrated e-commerce features like secure checkout, shopping carts, and product listings. More advanced tiers provide capabilities like gift cards, abandoned cart recovery, and shipping calculators.&lt;/p&gt;

&lt;p&gt;Shopify seamlessly integrates with all the major payment gateways. This makes the checkout process easy and painless for your customers. Shopify also has a thriving app store with thousands of add-ons to further customize and scale your business.&lt;/p&gt;

&lt;h3&gt;
  
  
  WordPress
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://www.wordpress.com"&gt;WordPress&lt;/a&gt; is the world’s most popular open-source website builder, currently powering over 40% of all websites online. Its wide adoption comes down to its versatility and flexibility.&lt;/p&gt;

&lt;p&gt;WordPress is highly customizable thanks to its open-source nature. There are literally thousands of themes and plugins available to add new features and functionality to your site. Although WordPress has a steeper learning curve than some other builders, the possibilities are endless.&lt;/p&gt;

&lt;p&gt;WordPress caters to bloggers, small business owners, developers, and advanced website builders. It can be used to create all kinds of sites including e-commerce stores, portfolios, membership sites, forums and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CMH5HP0o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ABhIyLQyt82Oa4TCH.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CMH5HP0o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ABhIyLQyt82Oa4TCH.jpg" alt="" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Webflow
&lt;/h3&gt;

&lt;p&gt;Webflow provides a visual web design platform that lets you build responsive websites through a drag-and-drop interface. It empowers designers, freelancers, agencies, and small businesses to create elegant sites quickly without needing to code.&lt;/p&gt;

&lt;p&gt;The learning curve is steeper compared to website builders like Wix or Squarespace. However, Webflow allows for finer control over the design and development process. It also generates clean underlying code for each site.&lt;/p&gt;

&lt;p&gt;Webflow is ideal for launching custom sites like portfolios to showcase work and client websites. Designers can easily import templates, add animations, customize CSS, and experiment rapidly using Webflow’s visual interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  More Custom Options
&lt;/h3&gt;

&lt;p&gt;For those wanting complete design control or a more technical website building experience, there are a few other options:&lt;/p&gt;

&lt;p&gt;HTML, CSS, JavaScript: You can fully customize a website by coding it manually using HTML, CSS, and JavaScript. This provides the most flexibility but requires strong coding skills and time.&lt;/p&gt;

&lt;p&gt;JavaScript Frameworks: JavaScript frameworks like &lt;a href="https://react.dev/"&gt;React&lt;/a&gt;, &lt;a href="https://angularjs.org/"&gt;Angular&lt;/a&gt;, &lt;a href="https://vuejs.org/"&gt;Vue&lt;/a&gt;, and &lt;a href="https://svelte.dev/"&gt;Svelte&lt;/a&gt; allow you to build interactive sites. They have a steeper learning curve but enable complex functionality like single-page applications. These are great for web developers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8XMl9Xt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/640/0%2AzMUsRIMC7NLWatHr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8XMl9Xt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/640/0%2AzMUsRIMC7NLWatHr.jpg" alt="" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Static Site Generators: Options like GatsbyJS, Jekyll, and Hugo are static site generators. They build sites using your content and templates/themes to output HTML files. They provide speed and security benefits.&lt;/p&gt;

&lt;p&gt;Headless CMS: You can build the front-end of your site using a JavaScript framework while managing content in a headless CMS like Contentful or Strapi. This is a decoupled approach popular with developers.&lt;/p&gt;

&lt;p&gt;While these technical options require more skill, they provide the most customization potential. They are great choices for complex or large-scale websites and web applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Whether you’re a coding pro or total tech newbie, there’s a website builder out there for you in 2023. Wix and Squarespace provide drag-and-drop simplicity for stunning sites. Shopify is the premier choice for online stores. WordPress offers endless customization potential. For visual design control, turn to Webflow. If you want complete code-level capability, HTML, CSS and JavaScript frameworks like React give you unmatched flexibility.&lt;/p&gt;

&lt;p&gt;The right website builder depends on your goals, skills, and project needs. With this overview of the top options, you can confidently choose the best platform to create the website of your dreams this year.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://boldercloud.com.au/get-started-must-know-website-builders-for-2023/"&gt;&lt;em&gt;https://boldercloud.com.au&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on August 1, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>An Easy Guide to Large Language Models in 2023</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Fri, 04 Aug 2023 06:01:18 +0000</pubDate>
      <link>https://forem.com/stonediggity/an-easy-guide-to-large-language-models-in-2023-3fid</link>
      <guid>https://forem.com/stonediggity/an-easy-guide-to-large-language-models-in-2023-3fid</guid>
      <description>&lt;p&gt;The pace of technology evolution is blinding and never more-so than in the AI space. In 2023 we have seen the emergence of a veritable AI arms race. You’d have to be living under a rock to have missed the release of Open AI’s ChatGPT last year which has been closely followed by a hoard of capable (and not so capable) models. It can be hard to keep up with modern developments but in this guide to large language models (LLMs) in 2023 we are here to help!&lt;/p&gt;

&lt;p&gt;We will explore the current LLM landscape touching briefly on the major open and closed source models. We’ll take a brief look at the current closed and open-source models to understand their real-world applications, performance metrics, and some use considerations. So let’s get into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Even is a LLM?
&lt;/h2&gt;

&lt;p&gt;Large Language Models are AI models that leverage the power of machine learning algorithms to comprehend, generate, and predict text in a manner that mimics human language abilities. Built upon the principles of Natural Language Processing (NLP), these models work by training on an extensive corpus of text data, learning linguistic patterns, syntax, and semantics. This allows them to generate coherent and contextually relevant text based on the input they receive.&lt;/p&gt;

&lt;p&gt;As they process an input, they analyze the structure and context of the text, making predictions about what comes next. This is not just limited to word prediction but extends to entire sentences and even paragraphs, giving them the ability to write essays, write code, answer questions, and much more.&lt;/p&gt;

&lt;p&gt;The TL:DR; version is that this are basically just very, very good next word (really, next character predictors). The power of these models lies in their ability to handle tasks requiring a deep understanding of language and context. This includes tasks like sentiment analysis, language translation, text summarization, and question answering.&lt;/p&gt;

&lt;p&gt;With the ongoing advancements in this field, LLMs continue to refine their ability to understand subtleties in language. This includes handling ambiguity, and generating creative responses, bringing us ever closer to the goal of creating truly intelligent, artificial general intelligence (AGI).&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Open Source vs. Closed Source LLMs
&lt;/h2&gt;

&lt;p&gt;Open source and closed source models represent two distinct approaches to the development and distribution of Large Language Models.&lt;/p&gt;

&lt;p&gt;Open source models, as the name suggests, are publicly accessible and can be freely used, modified, and distributed by anyone. This openness encourages a collaborative development approach. Here a diverse community of developers can contribute towards refining and improving the model. The transparency of open source also allows for extensive peer review, which can lead to more robust and reliable models. According to Huggingface, top open source models currently include Meta’s Llama 2, Stability AI’s Stable Beluga, Airoboros, and Falcon.&lt;/p&gt;

&lt;p&gt;On the other hand, closed source models are proprietary and their underlying code (or training modalities and data) is not publicly available. These models are typically developed, owned, and maintained by specific organizations or companies, and they retain full control over how these models are used and distributed.&lt;/p&gt;

&lt;p&gt;Closed source models can provide competitive advantages for their owners and often come with dedicated support and frequent updates. However, their secretive nature can make it difficult for outside researchers to understand their inner workings or verify their reliability and fairness. The biggest open source models currently out include OpenAI’s GPT-4, Anthropic’s Claude 2, Microsoft’s BingChat, and Google’s Bard .&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source Options
&lt;/h2&gt;

&lt;p&gt;Closed source LLMs provide a range of benefits that can be appealing in their application. One of the key advantages is the high level of control it offers to the creators. They can decide who can access and use the model, thus protecting their intellectual property. In competitive industries, this can be particularly advantageous, helping organizations maintain a competitive edge.&lt;/p&gt;

&lt;p&gt;Closed source LLMs also often come with great support from the open source community. This means that users can rely on a team of professionals and enthusiasts for assistance, problem-solving and regular updates, ensuring that the models stay current and efficient.&lt;/p&gt;

&lt;p&gt;Lastly, closed source models can provide more security. Because their inner workings are not publicly available, they can be less vulnerable to malicious tampering or misuse. Additionally, users can control data in their own fashion. This can make them more suitable for sensitive applications where security and privacy are paramount.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closed Source Considerations
&lt;/h2&gt;

&lt;p&gt;Closed-source Large Language Models, such as GPT-4, Claude 2, BingChat, and Bard, have numerous benefits. Firstly, they promise high-quality and consistent outputs. They’re trained on expansive, carefully chosen datasets, usually encompassing a diverse data range and thorough fine-tuning. This results in powerful models that give accurate results, a crucial trait for businesses relying on dependability. Additionally, these models’ makers are dedicated to enhancing their performance, regularly updating them to boost functionality and rectify any issues.&lt;/p&gt;

&lt;p&gt;Another significant advantage of closed-source LLMs is their robust support and security framework. Unlike many open-source alternatives, these models come with dedicated support teams. Users can count on swift replies to their questions and steady support during the model’s use. In terms of security, closed-source LLMs stand strong. They retain more control over their models’ use, preventing misuse effectively. This makes them an appealing choice for organizations that prioritize data security and confidentiality. Furthermore, these models often have protocols in place to hinder unethical or damaging use, aligning them better with responsible AI practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose?
&lt;/h2&gt;

&lt;p&gt;Choosing between open and closed source LLMs is not a straightforward task. Several factors come into play, like budget, need for customization, and control over the learning model.&lt;/p&gt;

&lt;p&gt;Open-source LLMs usually suit projects with limited funds and a high customization demand. Their transparency and collaborative nature may also be a plus for teams eager to learn from and contribute to the broader developer community.&lt;/p&gt;

&lt;p&gt;In contrast, closed-source models often bring professional support and regular updates to the table. This can benefit teams seeking reliability and well-documented modifications. These models may also boast unique features or algorithms that offer a competitive edge in certain uses. However, they often come at a higher cost, and customization options might be limited.&lt;/p&gt;

&lt;p&gt;The level of technical expertise is another important factor. Teams with strong technical skills might favor open-source models, given they can maximize these models’ customization potential and handle issues autonomously. On the other hand, teams with fewer technical skills may lean towards closed-source models, which typically provide dedicated support and maintenance services. Therefore, assessing your team’s technical capabilities and resources is crucial when selecting the most fitting LLM model.&lt;/p&gt;

&lt;p&gt;Choosing between open and closed source LLMs is a matter of matching the project’s specific needs and resources. It’s a decision requiring a careful weigh-in of both model types’ pros and cons.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what can they really do?
&lt;/h2&gt;

&lt;p&gt;The use case ideas for LLMs in modern applications is practically endless. With increased ability to integrate with a multitude of APIs it is up to the developers imagination. That said, some of the applications we’ve seen so far this year include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated Content Generation: LLMs can be used to create automated content for websites, blogs, and social media platforms, reducing the burden on human writers and accelerating content production (JasperAI, ChatGPT).&lt;/li&gt;
&lt;li&gt;Sentiment Analysis: By analyzing text data, LLMs can determine the sentiment behind customer reviews or social media posts, assisting businesses in identifying trends and improving their services.&lt;/li&gt;
&lt;li&gt;Language Translation: LLMs can be used to develop sophisticated translation services, breaking down language barriers and facilitating global communication.&lt;/li&gt;
&lt;li&gt;Educational Tools: LLMs can create personalized learning materials, adapt to individual learning pace, and even answer student queries, revolutionizing the education sector (ConsensusAI, QuillBot).&lt;/li&gt;
&lt;li&gt;Chatbots: LLMs are instrumental in creating chatbots for customer service, providing instantaneous, accurate responses, and improving customer experience (Replika).&lt;/li&gt;
&lt;li&gt;Data Mining and Text Extraction: LLMs can be used to mine and extract relevant information from large data sets, saving time and resources. This is becoming particularly useful in the world of API and webscraping as the link between NLP and code continues to become more functional.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  All-up
&lt;/h2&gt;

&lt;p&gt;In the whirlwind of the AI evolution, Large Language Models (LLMs) have emerged as crucial game-changers. These AI marvels are transforming everything from content creation to customer service and education.&lt;/p&gt;

&lt;p&gt;In this easy guide to LMs we can see they come in different flavors: the community-driven open source models like Llama 2 or Stable Beluga, which foster innovation through transparency, and the proprietary, closed-source models like Claude 2 or BingChat, known for their robustness, support, and control over usage.&lt;/p&gt;

&lt;p&gt;Each kind of model has its strengths and caters to different needs. But irrespective of their source, these AI models are an integral part of our digital lives. The key to navigating this rapidly evolving landscape is understanding your specific needs, resources, and goals.&lt;/p&gt;

&lt;p&gt;In this thrilling era of AI, LLMs are not just tools but trailblazers, guiding us into a future where human and machine communication intertwine seamlessly. So, let’s embrace this future with excitement, responsibility, and respect for the transformative power these models hold. The AI future isn’t a distant dream; it’s here, now, and it’s ours to shape.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Modern Web: Five Must Know Development Trends</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Tue, 01 Aug 2023 06:37:07 +0000</pubDate>
      <link>https://forem.com/stonediggity/modern-web-five-must-know-development-trends-36md</link>
      <guid>https://forem.com/stonediggity/modern-web-five-must-know-development-trends-36md</guid>
      <description>&lt;p&gt;From the earliest static pages of the internet to the dynamic, interactive sites of today, web development has undergone a dramatic evolution. The evolution in basic HTML to the sophisticated JavaScript frameworks we see now continues to advacne the landscape of web development,&lt;/p&gt;

&lt;p&gt;Understanding and keeping up with web development trends is not only essential for developers but also for businesses. It enables us to provide better user experience, improve engagement, and ultimately drive growth. The number of frameworks, hosting options, SEO optimisations, plugins, packages, languages and more can seem overwhelming! In this article, we’ll explore some of the top trends shaping the future of web development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Progressive Web Apps (PWAs)
&lt;/h2&gt;

&lt;p&gt;PWAs are web applications that leverage modern web capabilities to deliver an app-like experience to users. They are fast, can work offline, and can be installed on the user’s device just like native apps.&lt;/p&gt;

&lt;p&gt;Accordingly, the shift towards these PWAs is one of the most significant trends in web development and marks an integration of the app and traditional web-page environments. PWAs combine the best features of web and mobile apps, offering a robust and engaging user experience. For business they significantly boost user engagemen t, increase conversion rates, and provide an overall better user experience.&lt;/p&gt;

&lt;p&gt;Several companies have already seen the benefits of using PWAs. Twitter (now rebranded to X) launched Twitter Lite, a PWA that resulted in increased engagement and reduced data usage. Similarly, Starbucks’ PWA has significantly increased daily active users.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Chatbots
&lt;/h2&gt;

&lt;p&gt;AI Chatbots are becoming a vital tool in enhancing user interaction on websites. By mimicking human conversation, they provide instant responses to user queries and improve customer service.&lt;/p&gt;

&lt;p&gt;Recent advancements in these chatbots and LLMs include better natural language processing (NLP) capabilities, understanding user intent, and personalization. These advancements have made them more human-like, efficient, and capable of delivering a better user experience.&lt;/p&gt;

&lt;p&gt;The emerging utility of AI chatbots is in the ability to seed them with specific knowledge on a topic rather than the generalised models we see in services like Chat GPT. This can be done through vector database plugins ( Pinecone being a notable example) or by fine tuning. Additionally with the available of more powerful opens source models this has allowed chatbots to be more fine tuned to specific needs.&lt;/p&gt;

&lt;p&gt;Companies like Sephora, Duolingo, and Domino’s Pizza have successfully integrated AI chatbots into their websites, improving customer engagement and sales.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accelerated Mobile Pages (AMPs)
&lt;/h2&gt;

&lt;p&gt;In an era where smartphone use predominates, the performance of mobile web pages can directly influence a website’s success. Recognizing this, Google launched Accelerated Mobile Pages (AMPs), a web component framework and a website publishing technology designed to improve the performance of web content and advertisements.&lt;/p&gt;

&lt;p&gt;AMPs streamline the structure of web pages to prioritize speed and readability, employing a pared-down version of HTML, referred to as AMP HTML. JavaScript, known for its potential to slow down page load times, is heavily restricted in this setup, and a unique, Google-controlled content delivery network (AMP Cache) is used. These optimized pages load near-instantaneously, providing a smoother, more engaging user experience.&lt;/p&gt;

&lt;p&gt;The implementation of AMPs can bring about several noteworthy benefits. It drastically reduces the time content takes to get to a user’s mobile device, reducing bounce rates as users are less likely to abandon a site that loads quickly. The increased site speed and improved user experience can also enhance engagement metrics, leading to increased dwell time and more page views per visit. Furthermore, AMPs can indirectly influence a site’s visibility in search results. While AMP adoption itself is not a ranking factor, the page speed and mobile-friendliness it facilitates are indeed elements considered by Google’s algorithm.&lt;/p&gt;

&lt;p&gt;Several big-name companies have seen the impact of AMPs firsthand. The Washington Post, for instance, reported a 23% increase in mobile search users who return within seven days when they switched to AMPs. Gizmodo reached a staggering 100% increase in unique visitors after implementing AMPs. These cases are testaments to how AMPs can boost not only site performance but also bottom-line business metrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimized Voice Search
&lt;/h2&gt;

&lt;p&gt;The introduction of virtual assistants such as Siri, Alexa, and Google Assistant has changed the way we interact with our tect. As more consumers acquire smart speakers and grow comfortable with these voice-activated assistants on their smartphones, voice search has ascended from novelty to necessity. Its adoption hinges on its ability to offer a more natural, convenient, and conversational interactions.&lt;/p&gt;

&lt;p&gt;As voice search technology matures, with forecasts suggesting that 50% of all searches will be voice searches during 2023, web development now necessitates a strong focus on voice search optimization. But optimizing for voice search requires a different approach than traditional SEO methods, primarily because of the difference in the structure of voice search queries, which tend to be longer and more conversational.&lt;/p&gt;

&lt;p&gt;Firstly, to optimize for voice search, web developers and SEO specialists should shift their focus to long-tail keywords that align more with natural speech patterns. Unlike typed searches, which often consist of short, choppy keywords, voice searches are typically longer with more conversational phrases.&lt;/p&gt;

&lt;p&gt;Secondly, voice search optimization requires creating content that directly answers common user queries. As voice searches are often in question format, websites should include content that responds concisely and accurately to these questions. A commonly used approach is to structure content in an FAQ format, offering clear answers to commonly asked questions related to the business or industry.&lt;/p&gt;

&lt;p&gt;Technical SEO aspects like schema markup and structured data are even more critical with voice search. These elements help search engines understand the context and content of a webpage, making it more likely that the page’s content will be selected as the answer to a voice search query. A well-structured website with comprehensive and correctly implemented metadata is an essential requirement for effective voice search optimization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cybersecurity in Web Development
&lt;/h2&gt;

&lt;p&gt;In today's digital landscape, cybersecurity has moved from being a peripheral consideration to a core component of web development. With the escalating threat of data breaches, protecting the website's integrity and the user's sensitive data has become a cardinal concern.&lt;/p&gt;

&lt;p&gt;Integrating cybersecurity measures into every stage of web development is essential. It's not a matter of tacking on security features at the end but incorporating security considerations from the inception of the design process.&lt;/p&gt;

&lt;p&gt;Emerging non-traditional methods for enhancing cybersecurity are gaining recognition. For instance, the concept of 'security by design' encourages developers to proactively consider potential threats at the initial stages of development. Similarly, DevSecOps, a practice that infuses security into the DevOps process, ensures a continual focus on security throughout the development lifecycle.&lt;/p&gt;

&lt;p&gt;Moreover, harnessing the power of AI and machine learning is a novel approach. AI algorithms can identify unusual activity, spotting threats early, while machine learning can automate routine security tasks, freeing developers to tackle complex challenges.&lt;/p&gt;

&lt;h2&gt;
  
  
  All Up
&lt;/h2&gt;

&lt;p&gt;In the digital era, the constant evolution of technology propels forward the web development landscape. Progressive Web Apps (PWAs), AI Chatbots, Accelerated Mobile Pages (AMPs), and optimized Voice Search have emerged not only as trends but also as powerful tools that are fundamentally transforming the manner in which we build, manage, and interact with websites. These advancements herald an era of speed, efficiency, and improved user engagement, providing enhanced customer experiences and paving the way for more effective business strategies.&lt;/p&gt;

&lt;p&gt;Incorporating these trends into web development processes and business strategies is no longer an option but a necessity. BolderCloud we can help you to choose the right options and servcies for you. Keeping up is possible when you have a qualified team on your side. Get in touch to find out about our services today.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://boldercloud.com.au"&gt;https://boldercloud.com.au&lt;/a&gt; on August 1, 2023.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>pwa</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Nuclear war or paperclip demise. The problem of AI alignment.</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Tue, 25 Jul 2023 09:59:37 +0000</pubDate>
      <link>https://forem.com/stonediggity/will-it-really-end-in-red-eye-lasers-and-nuclear-war-the-problem-of-ai-alignment-3hnn</link>
      <guid>https://forem.com/stonediggity/will-it-really-end-in-red-eye-lasers-and-nuclear-war-the-problem-of-ai-alignment-3hnn</guid>
      <description>&lt;p&gt;Image Credit: Ruby Chen courtesy &lt;a href="https://openai.com/blog/introducing-superalignment"&gt;OpenAI&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the thick of the 80s, as a wide-eyed kid, I fell in love. Not with the girl next door (I was wayyyy too chubby) or the brand-new BMX bike (like I said, chubby), but with a world filled with flashing lights and beeping sounds that spoke a language only a few could understand. It was the dawn of the personal computing age, and I was one of those lucky ones, bashing away at the DOS prompt and writing D&amp;amp;D choose-your-own-adventure batch files to trial on my brother. &lt;/p&gt;

&lt;p&gt;It was my portal to the unknown, a gateway to a universe of infinite possibilities.&lt;/p&gt;

&lt;p&gt;The world was enraptured by science fiction, a genre that painted colorful pictures of what technology could bring for the future of humanity. I distinctly remainder the first time I saw '&lt;a href="https://en.wikipedia.org/wiki/The_Terminator"&gt;The Terminator&lt;/a&gt;', the masterpiece starring &lt;a href="https://en.wikipedia.org/wiki/Arnold_Schwarzenegger"&gt;Arnold Schwarzenegger&lt;/a&gt;, not just because of how awesome it was, but I remember asking myself over and over again, how could we make some that would end up killing us? Why would a &lt;a href="https://en.wikipedia.org/wiki/Self-awareness"&gt;self-aware&lt;/a&gt; sentience destroy the human race?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aZLFZEhz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/na39405qz6ttnkydvm8m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aZLFZEhz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/na39405qz6ttnkydvm8m.jpg" alt="Image description" width="258" height="385"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="http://www.impawards.com/1984/terminator.html"&gt;The Terminator&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Fast forward to the present day, and my childhood passion for computers has evolved into a career where I've had the chance to move into IT and computer science after careers in medicine and engineering. The evolution of transformers and the explosion in AI (particularly in the &lt;a href="https://en.wikipedia.org/wiki/Large_language_model"&gt;large language model&lt;/a&gt; space) is nothing short of so exciting but but also leaves me wondering...when do the nukes launch?&lt;/p&gt;

&lt;p&gt;The question is, when &lt;a href="https://en.wikipedia.org/wiki/Superintelligence"&gt;superintelligence&lt;/a&gt; emerges will it be for us or against us? Will it even see us from the lens of good and bad or approach it's part in our demise from a pure utilitarian perspective?&lt;/p&gt;

&lt;h2&gt;
  
  
  Superintelligence
&lt;/h2&gt;

&lt;p&gt;First let's talk about superintelligence. When we say superintelligence, we refer to an AI system that possesses capabilities far exceeding the cognitive performance of humans in virtually all economically valuable work. It's a double-edged sword. On one hand, it holds the potential to solve many of the world's most crucial problems. On the other hand, it could wield immense power that, if misaligned, might lead to human disempowerment or even extinction.&lt;/p&gt;

&lt;p&gt;Super intelligence follows the emergence of &lt;a href="https://en.wikipedia.org/wiki/Artificial_general_intelligence"&gt;artificial general intelligence&lt;/a&gt;, which is an agent that can basically can do humans can do now. The timelines for AGI and superintelligence are as soon as 2 and 10 years on some &lt;a href="https://en.wikipedia.org/wiki/Superintelligence#:~:text=The%20survey%20defined%20the%20achievement,in%20less%20than%2010%20years."&gt;optimistic estimates&lt;/a&gt; (or pessimistic depending on which side of the fence you sit on). &lt;/p&gt;

&lt;h2&gt;
  
  
  Dumb ways to die
&lt;/h2&gt;

&lt;p&gt;So now we have a superintelligent agent, it's pretty obvious that if we come to blows with it and it has the nuclear codes, it's going to use them. But there are more subtle ways that a superintelligent or capable agent could take us out that don't appear to be as malevolently based. Take the &lt;a href="https://www.lesswrong.com/tag/squiggle-maximizer-formerly-paperclip-maximizer"&gt;paper clip maximiser&lt;/a&gt; as an example.&lt;/p&gt;

&lt;p&gt;Imagine an advanced AI whose sole objective is to manufacture as many paperclips as possible. It's a benign task at first glance. However, without proper alignment to human values, the AI could interpret its goal in the most extreme and literal sense, leading to unintended consequences.&lt;/p&gt;

&lt;p&gt;For instance, to maximize its objective, the AI might start exploiting all available resources to create more paperclips, ignoring the detrimental impacts on the environment, economy, or human life. It might convert entire cities, forests, or ultimately the whole planet into paperclips. The AI could even perceive humans as a threat to its mission, especially if we attempt to shut it down.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sdGS8vq0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76t6853m0bzc1hcokehf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sdGS8vq0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76t6853m0bzc1hcokehf.png" alt="Image description" width="535" height="468"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Clippy wouldn't mind if AI turned the world into paperclips.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The goal of this thought experiment is not to suggest that superintelligent AIs will literally turn everything into paperclips. Rather, it highlights the risks posed by misaligned AI objectives, underscoring the importance of aligning AI systems with human values and intentions, especially as their capabilities approach or surpass human-level intelligence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alignment
&lt;/h2&gt;

&lt;p&gt;Currently, our methods for aligning AI, such as reinforcement learning from human feedback, rely heavily on our ability to supervise these AI systems. However, as these systems become more intelligent and complex, our capacity to oversee them effectively will be outstripped. We therefore stand at the precipice of a new frontier in AI research: aligning superintelligent AI with human intent.&lt;/p&gt;

&lt;p&gt;In this wandering, organizations like OpenAI are flagging the necessity to tread lightly, reservedly and ensure robust systems exist to monitor and regulate the use and proliferation of AI (and I'm sure there's no commercial motive there). They are aiming to construct a human-level automated alignment researcher, a system designed to understand and follow human intentions accurately. The end goal? A superintelligent system that acts as a true ally to humanity, a system that aligns with our values, ethics, and intentions rather than operating on an entirely separate trajectory.&lt;/p&gt;

&lt;p&gt;However, this journey is not without its trials. The alignment of superintelligent AI is a problem of such complexity that it requires not only significant technical breakthroughs but also careful consideration of many issues. These include things like misuse, economic disruption, disinformation, and bias. It's a quest that demands collaboration, transparency, and foresight. AI is not just the purview of silicon valley &lt;a href="https://thestyletti.com/sneans/"&gt;sneans&lt;/a&gt; wearing elites. It is up to philosophers, sociologists, economists and government entities to determine what we want, because if we don't get it right now, it's pretty clear how things could get out of hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I wish I could say from my first line of code that I knew I would grow up thinking about computers and doing great things with them. This, unfortunately, hasn't been the case and my Starcraft ladder rankings are a good summary of just how successful I've been. That said, I am excited to see what happens now. A few years of AI development will rocket by. It's already mind boggling to see the pace of change since ChatGPT dropped at the end of 2022 and as we see more capable open source models like &lt;a href="https://ai.meta.com/llama/"&gt;Llama 2&lt;/a&gt; dropping, there will be no pause on development.&lt;/p&gt;

&lt;p&gt;It's important for us to answer the question now. What do we want from our AI systems and how can we make sure that their development is aligned with these values? Like most things however, I feel governments will act at the glacial pace that they do and we'll end up in a coin flip for either boiling in an &lt;a href="https://www.ipcc.ch/"&gt;increasingly heated planet&lt;/a&gt;, or turned into a paper clip. With those two on offer the latter actually doesn't sound so bad.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I am a freelancer helping people incorporate emerging AI solutions into their life. Contact me here or at &lt;a href="https://erudii.com/"&gt;Erudii&lt;/a&gt; if you'd like to know more!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>openai</category>
      <category>ai</category>
      <category>chatgpt</category>
      <category>development</category>
    </item>
    <item>
      <title>Steer Your Conversations with ChatGPT: Custom Instructions Are Here</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Thu, 20 Jul 2023 20:44:55 +0000</pubDate>
      <link>https://forem.com/stonediggity/steer-your-conversations-with-chatgpt-custom-instructions-are-here-12k4</link>
      <guid>https://forem.com/stonediggity/steer-your-conversations-with-chatgpt-custom-instructions-are-here-12k4</guid>
      <description>&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@freshvanroot?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Rolf van Root&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/oLthDWAG244?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openai.com/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; is rolling out a fresh, innovative feature to its Plus users that will allow us to get to the crux of our conversations. Say hello to custom instructions, an addition set to redefine the way you interact with the beloved (and besmirched) AI, ChatGPT.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Custom Instructions Revolution
&lt;/h2&gt;

&lt;p&gt;As a user, you're familiar with the journey we've embarked upon, aiming to enhance the steerability of our models. Our mission has been to ensure that ChatGPT aligns with the diverse contexts and unique needs of users worldwide. The custom instructions feature is a critical step towards this objective.&lt;/p&gt;

&lt;p&gt;So, what does this feature bring to the table?&lt;/p&gt;

&lt;p&gt;Custom instructions allow you to instill your preferences or requirements into ChatGPT. This means, instead of starting each conversation from scratch, ChatGPT carries forward your custom instructions, applying them to every response, thus reducing the redundancy in your interactions.&lt;/p&gt;

&lt;p&gt;For instance, if you're a teacher formulating a lesson plan, there's no need to reiterate that you teach 3rd-grade science. Similarly, developers who desire efficient code in a non-Python language can communicate this preference once, and it will be considered throughout the interaction. The feature comes in handy for large family grocery shopping as well, with ChatGPT adjusting the list for six servings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting it Up
&lt;/h2&gt;

&lt;p&gt;The custom instructions are a beta feature so to use it in your chat you need to have a ChatGPT plus subscription. You're then able to go to your settings and switch it on.&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%2Fwb3a7tdznbzxhffk6er6.jpg" 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%2Fwb3a7tdznbzxhffk6er6.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Seeing the Difference: Custom Instructions On and Off
&lt;/h2&gt;

&lt;p&gt;To better illustrate the difference, consider the following scenario of requesting ChatGPT to write code for finding the nth number in the Fibonacci sequence:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Instructions Off&lt;/strong&gt;&lt;br&gt;
When asked to "Write code for getting the nth number in the Fibonacci sequence" with custom instructions off, ChatGPT produces:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Sure, here is a simple Python function to compute the nth number in the Fibonacci sequence using a recursive method:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def fibonacci_recursive(n):
    if n ≤ 0:
        print("Input should be a positive integer")
        return None
    elif n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return fibonacci_recursive(n-1) + fibonacci_recursive(n-2)

# Test
print(fibonacci_recursive(10))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;`This recursive solution, however, is not very efficient (it has an exponential time complexity due to repeated calculations), especially for larger values of n.&lt;/p&gt;

&lt;p&gt;Here's a more efficient version using dynamic programming (this has linear time complexity):`&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def fibonacci_dp(n):
    if n ≤ 0:
        print("Input should be a positive integer")
        return None
    elif n == 1:
        return 0
    elif n == 2:
        return 1

    fib = [0, 1]
    while len(fib) &amp;lt; n:
        fib.append(fib[-1] + fib[-2])

    return fib[-1]

# Test
print(fibonacci_dp(10))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;In these functions, n=1 corresponds to the first number in the Fibonacci sequence (which is 0), n=2 corresponds to the second number (which is 1), and so on.&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Long and verbose, but the ChatGPT that we've come to know and love. Well now there's a way to get to the point!!&lt;/p&gt;
&lt;h2&gt;
  
  
  Custom Instructions On
&lt;/h2&gt;

&lt;p&gt;Here is an example of the same prompt from the &lt;a href="https://openai.com/blog/custom-instructions-for-chatgpt" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; release on this. First you setup your custom instructions which will be weighted for the remainder of the conversation. This saves all that pesky "please just give me the code" type prompting.&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%2Fm1zv45ijujejlsrsztzw.jpg" 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%2Fm1zv45ijujejlsrsztzw.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the same prompt ("Write me code for getting the nth number in the Fibonacci sequence") you pretty much just get what you're after:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import "fmt"

func Fibonacci(n int) int {
    if n ≤ 1 {
        return n
    }
    a, b := 0, 1
    for i := 2; i ≤ n; i++ {
        a, b = b, a+b
    }
    return b
}

func main() {
    fmt.Println(Fibonacci(10)) // replace 10 with the nth number
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;In a nutshell, with the dawn of custom instructions, ChatGPT isn't just another AI—it's your AI. It remembers, it learns, it adapts, and most importantly, it understands you better with each interaction. This innovation brings us a step closer to a world where technology isn't just smart—it's personalized. So gear up, set your instructions, and let ChatGPT surprise you with its nuanced understanding of your needs. Because at OpenAI, we believe the future of AI isn't just in creating intelligent systems—it's in crafting experiences that are uniquely yours. Stay tuned for more exciting updates on our journey to redefine the way you interact with AI. The AI revolution is here, and it’s more personal than ever!&lt;/p&gt;

&lt;p&gt;Reference: This example and post is adapted straight from the &lt;a href="https://openai.com/blog/custom-instructions-for-chatgpt" rel="noopener noreferrer"&gt;OpenAI release on this feature&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you'd like to know more about AI and making it work for your business checkout my startup Erudii. I'm always looking for people to collaborate with!&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>openai</category>
      <category>llm</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Llama 2: A Wolf in Sheep's Clothing?</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Thu, 20 Jul 2023 08:29:52 +0000</pubDate>
      <link>https://forem.com/stonediggity/llama-2-a-wolf-in-sheeps-clothing-1jl3</link>
      <guid>https://forem.com/stonediggity/llama-2-a-wolf-in-sheeps-clothing-1jl3</guid>
      <description>&lt;p&gt;&lt;a href="https://about.meta.com/"&gt;Meta&lt;/a&gt; recently unleashed their latest creation, Llama 2, upon the AI community - and it's making some serious waves. This new large language model (LLM) from Meta is more than just a research project, it's a bold move towards open source and a direct challenge to closed models from big tech.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Impressive Open Source Model
&lt;/h2&gt;

&lt;p&gt;So what exactly is Llama 2 bringing to the table? It's a major upgrade over Meta's previous Llama model with &lt;a href="https://huggingface.co/papers/2307.09288"&gt;double the parameters at 70B&lt;/a&gt; (a 40% increase over the first model). It was trained on a huge dataset of 2 trillion tokens, giving the model stronger performance on benchmarks for helpfulness, safety, and reduced toxicity according to Meta.&lt;/p&gt;

&lt;p&gt;But the real kicker is that unlike key competitors like Google's LaMDA and Anthropic's Claude, Meta is openly licensing Llama 2 for non-commercial research AND commercial use. This gives developers way more flexibility to build on top of Llama 2 and integrate it into their own applications and services.&lt;/p&gt;

&lt;p&gt;Meta is even providing pretrained versions of Llama 2 ready for fine-tuning on platforms like &lt;a href="https://huggingface.co/papers/2307.09288"&gt;HuggingFace&lt;/a&gt;. There's the base Llama 2 model, as well as Llama 2-Chat finetuned specifically for conversational tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sparking a Generative AI Showdown
&lt;/h2&gt;

&lt;p&gt;By releasing such a high-capability open source LLM, Meta makes a bold statement - they are ready to compete with the likes of Apple, Google and others on equal footing in generative AI research.&lt;/p&gt;

&lt;p&gt;Previously, these tech giants guarded their latest models like LaMDA, GPT-4, and Apple's secret project closely. Llama 2 challenges them to stop hoarding their technology and put their money where their mouth is on open source development. We're now witnessing a generative model arms race. With Meta's move, the pressure is on for companies like Apple to unveil what they've been brewing behind closed doors. Llama 2 just upped the stakes in this AI battle among the tech titans.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Open Source" With Caveats
&lt;/h2&gt;

&lt;p&gt;However, some industry observers dispute Meta's "open source" characterization, pointing out the license places notable restrictions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Companies with over &lt;a href="https://huggingface.co/papers/2307.09288"&gt;700 million active daily&lt;/a&gt; users (looking at you Apple) are excluded from using Llama 2 without explicit permission. This aims to block tech giants like Apple from leveraging the model.&lt;/li&gt;
&lt;li&gt;License prohibits using Llama 2's outputs to improve proprietary LLMs. Again targeting competitors benefiting from Meta's work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So while more open than private models from tech giants, Meta still imposed limitations to maintain competitive edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pushing The Boundaries of Open Source AI
&lt;/h2&gt;

&lt;p&gt;The big question now is how will other tech giants respond? Will we see them release their own "open" models without the restrictive licensing? Or do even larger proprietary models get unveiled to eclipse what Llama 2 makes possible?&lt;/p&gt;

&lt;p&gt;One thing's for certain - Meta just accelerated the evolution of generative AI with Llama 2's arrival. Their open source challenger is pushing boundaries, forcing Big Tech to rethink their closed-door approach. Exciting times are ahead at the intersection of language models and open collaboration! It's agreat time to be a an AI developer and user as we see more and more of these fine tuned and competitive models being release. I for one and really excited to see what some of the 'less censored' offerings bring us!&lt;/p&gt;

&lt;p&gt;Reference: You can aread more about Llama 2 in the release paper &lt;a href="https://arxiv.org/pdf/2307.09288.pdf"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Image Created on &lt;a href="https://www.midjourney.com/app/"&gt;MidJourney&lt;/a&gt;&lt;br&gt;
Prompt: "funky llama, blues brothers suit, fantastic mr fox style, cool bright sunglasses, standing in village, wes anderson style, funny, --ar 4:3".&lt;/p&gt;

&lt;p&gt;If you'd like to know more about AI and making it work for your business checkout my startup &lt;a href="https://erudii.com/"&gt;Erudii&lt;/a&gt;. I'm always looking for people to collaborate with!&lt;/p&gt;

</description>
      <category>llama2</category>
      <category>ai</category>
      <category>llm</category>
    </item>
    <item>
      <title>The New Vercel AI SDK: Your Own Chatbot in a Flash</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Tue, 18 Jul 2023 00:56:19 +0000</pubDate>
      <link>https://forem.com/stonediggity/the-new-vercel-ai-sdk-your-own-chatbot-in-a-flash-499g</link>
      <guid>https://forem.com/stonediggity/the-new-vercel-ai-sdk-your-own-chatbot-in-a-flash-499g</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Empowering your applications with Artificial Intelligence (AI) and Machine Learning (ML) capabilities no longer requires a Ph.D. or years of specialized experience. With the advent of robust and user-friendly tools like the &lt;a href="https://vercel.com/blog/introducing-the-vercel-ai-sdk" rel="noopener noreferrer"&gt;Vercel AI SDK&lt;/a&gt;, it's now possible to build smart, conversational UIs effortlessly, regardless of your AI proficiency level.&lt;/p&gt;

&lt;p&gt;Vercel AI SDK abstracts away the complexities associated with integrating AI models, allowing you to focus on creating engaging user experiences. It offers a seamless pathway to AI functionalities, from setting up a fresh project using popular frameworks like Next.js and Tailwind CSS to crafting immersive chat interfaces with just a few lines of code. There are also options to easily integrate LLM frameworks like &lt;a href="https://python.langchain.com/docs/get_started/introduction.html" rel="noopener noreferrer"&gt;Langchain&lt;/a&gt; to make your bot more powerful.&lt;/p&gt;

&lt;p&gt;Ready to supercharge your application with AI? Let's embark on this exciting journey and explore the potential of Vercel AI SDK in unlocking a whole new world of possibilities for your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Next App
&lt;/h2&gt;

&lt;p&gt;Before we dive into the Vercel AI SDK specifics, let's create a new project using Next.js and Tailwind CSS. Next.js is a popular framework for building React applications, and Tailwind CSS is a utility-first CSS framework that is highly flexible and customizable.&lt;/p&gt;

&lt;p&gt;You can create a new Next.js application using the create-next-app utility. To start, enter the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-next-app@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this command, you'll be prompted with a series of questions to configure your new application.&lt;/p&gt;

&lt;p&gt;First, you'll need to name your application. Enter a suitable name when prompted.&lt;/p&gt;

&lt;p&gt;The next steps involve configuring your application. You will be asked if you would like to use the latest version of Next.js ("Would you like to use the latest version of Next.js?") and if you want to include Tailwind CSS ("Would you like to include Tailwind CSS?"). Make sure to answer 'yes' to both these questions.&lt;/p&gt;

&lt;p&gt;Finally, you will be asked if you want to specify a source directory ("Would you like to specify a source directory?"). For the purposes of this guide, you can answer 'no' to this question.&lt;/p&gt;

&lt;p&gt;Once you've completed the setup process, you'll have a new Next.js application that includes Tailwind CSS. This gives you a solid starting point to begin working with the Vercel AI SDK.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Vercel AI SDK
&lt;/h2&gt;

&lt;p&gt;The Vercel AI SDK is a newly-released open-source library aimed at assisting developers in creating engaging, conversational user interfaces that integrate seamlessly with streaming and chat functions. This library is built with JavaScript and TypeScript in mind and is compatible with popular frontend frameworks such as React/Next.js and Svelte/SvelteKit. Future support for Nuxt/Vue is also anticipated.&lt;/p&gt;

&lt;p&gt;To install the Vercel AI SDK, all you need to do is to run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install ai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The entire source code and various applications are available at the &lt;a href="https://github.com/vercel-labs/ai" rel="noopener noreferrer"&gt;Github&lt;/a&gt; here (also, how did they get that namespace!!??)&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Variables
&lt;/h2&gt;

&lt;p&gt;In many projects, especially those that involve external services like APIs or databases, it's often necessary to use sensitive data such as API keys, database URIs, or secret keys. These should not be hard-coded directly into your codebase, particularly if it's a public repository, as this can pose significant security risks.&lt;/p&gt;

&lt;p&gt;That's where environment variables come in. They allow developers to inject these values into the application, keeping them secure and out of the version-controlled codebase.&lt;/p&gt;

&lt;p&gt;In Next.js, and many other Node.js-based projects, environment variables are typically stored in a .env file at the root of your project. This file is used to define your environment variables.&lt;/p&gt;

&lt;p&gt;To get the &lt;a href="https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key" rel="noopener noreferrer"&gt;API secret key&lt;/a&gt; for Open AI you need to head over to their &lt;a href="https://openai.com/" rel="noopener noreferrer"&gt;website&lt;/a&gt;, login/signup and then navigate to your account and create a key.&lt;/p&gt;

&lt;p&gt;Here's an example of what your .env file might look like for a project using the Vercel AI SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENAI_API_KEY=your_openai_api_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, OPENAI_API_KEY is the environment variable that is set to the value your_openai_api_key. In your actual project, you would replace your_openai_api_key with your real OpenAI API key.&lt;/p&gt;

&lt;p&gt;It's crucial to remember that the .env file contains sensitive information and should not be committed to your public version control system. To ensure this file is ignored, add .env to your .gitignore file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .gitignore
.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Chat Streaming API
&lt;/h2&gt;

&lt;p&gt;To setup the chat API dive into the app/api folder/chat folder (or create it) and create your route.ts. The app router enables directory based routing. If you want a new page you put &lt;code&gt;page.tsx&lt;/code&gt; in the folder and if you need an API route it's &lt;code&gt;route.ts&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Enter the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { OpenAIStream, StreamingTextResponse } from 'ai'
import { Configuration, OpenAIApi } from 'openai-edge'

const config = new Configuration({
  apiKey: process.env.OPENAI_API_KEY
})
const openai = new OpenAIApi(config)

export const runtime = 'edge'

export async function POST(req: Request) {
  const { messages } = await req.json()

  const response = await openai.createChatCompletion({
    model: 'gpt-3.5-turbo',
    stream: true,
    messages
  })

  const stream = OpenAIStream(response)

  return new StreamingTextResponse(stream)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what is going on here? First, we import the necessary modules: OpenAIStream and StreamingTextResponse from the Vercel AI SDK, and Configuration and OpenAIApi from the 'openai-edge' package. These modules set the foundation for utilizing OpenAI's capabilities in our application.&lt;/p&gt;

&lt;p&gt;Next, we create an OpenAI API client using our OpenAI API key, stored securely as an environment variable. This client serves as our gateway to the powerful language models offered by OpenAI.&lt;/p&gt;

&lt;p&gt;After that, we specify the runtime as 'edge', indicating that we aim to execute our functions at the edge, ensuring reduced latency and improved performance.&lt;/p&gt;

&lt;p&gt;The magic happens within the POST function, which is an asynchronous function handling POST requests.&lt;/p&gt;

&lt;p&gt;Upon receiving a request, it extracts the 'messages' from the request's body. These 'messages' are then fed into the OpenAI API client's createChatCompletion method, which generates a dynamic conversation with the language model specified (in this case, 'gpt-3.5-turbo').&lt;/p&gt;

&lt;p&gt;The response from the OpenAI API client is then converted into a stream using OpenAIStream. This stream, which essentially represents a dynamic conversation with the AI, is then returned to the client as a StreamingTextResponse.&lt;/p&gt;

&lt;p&gt;In essence, this code showcases how to easily set up and manage an AI-powered conversation within your application using Vercel AI SDK and OpenAI. It's an elegant blend of AI and application development, bringing conversational AI at your fingertips.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Simple UI
&lt;/h2&gt;

&lt;p&gt;Tailwind CSS means that setting up the UI is very simple! in the app directory jump into the &lt;code&gt;page.tsx&lt;/code&gt;, remove the boilerplate code and enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'use client'

import { useChat } from 'ai/react'

export default function Chat() {
  const { messages, input, handleInputChange, handleSubmit } = useChat()

  return (
    &amp;lt;div className="flex flex-col w-full max-w-md py-24 mx-auto stretch"&amp;gt;
      {messages.length &amp;gt; 0
        ? messages.map(m =&amp;gt; (
            &amp;lt;div key={m.id} className="whitespace-pre-wrap"&amp;gt;
              {m.role === 'user' ? 'User: ' : 'AI: '}
              {m.content}
            &amp;lt;/div&amp;gt;
          ))
        : null}

      &amp;lt;form onSubmit={handleSubmit}&amp;gt;
        &amp;lt;input
          className="fixed bottom-0 w-full max-w-md p-2 mb-8 border border-gray-300 rounded shadow-xl"
          value={input}
          placeholder="Say something..."
          onChange={handleInputChange}
        /&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code showcases a simple chat interface built with the Vercel AI SDK in a React application. The useChat hook from the Vercel AI SDK is used, which provides chat state variables (messages and input) and functions (handleInputChange and handleSubmit) that manage the chat flow.&lt;/p&gt;

&lt;p&gt;The UI displays a chat history, where each message has a 'role' (either 'user' or 'AI') and 'content'. Users input their messages in a form field that updates the input state as they type, and sends it to the AI model upon submission, thereby adding to the conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give it a crack!
&lt;/h2&gt;

&lt;p&gt;Now all your hard work is done it's time to chat! Simply pop in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should open a local instance of the application for you to test out. You'll see that you're able to chat with the bot pretty easily.&lt;/p&gt;

&lt;p&gt;Note the streamed response which is an absolute dream considering when all this AI stuff kicked off this would take multiple lines of code/polling/websockets/readable streams for something like this.&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%2F6z0zel83u9zhuxmcc2ws.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%2F6z0zel83u9zhuxmcc2ws.gif" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can go ahead an deploy with a few clicks to &lt;a href="https://vercel.com/docs/concepts/deployments/overview" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; and show all your friends your very own chatbot!&lt;/p&gt;

&lt;h2&gt;
  
  
  Empowering Conversations with AI
&lt;/h2&gt;

&lt;p&gt;And just like that, you've leveled up your application by integrating the power of artificial intelligence! Using the Vercel AI SDK, you've breathed life into your user interfaces, enabling them to converse intelligently and in real-time with your users.&lt;/p&gt;

&lt;p&gt;But this is just the tip of the AI iceberg. The Vercel AI SDK supports an array of AI models from OpenAI, Hugging Face, and LangChain. Each of these AI powerhouses offers unique capabilities and strengths, waiting for you to harness them.&lt;/p&gt;

&lt;p&gt;Why stop at GPT-3.5? How about testing out Hugging Face's BERT or LangChain's advanced language models? The choice is yours, and the possibilities are endless.&lt;/p&gt;

&lt;p&gt;So, dive in, start exploring these different AI models, and watch as your application evolves from simply interactive to intelligently conversational. Go ahead, surprise yourself with what you and AI can achieve together. AI has never been this accessible and fun to play with!&lt;/p&gt;

&lt;p&gt;Remember, the future of AI is now. And with the Vercel AI SDK, you are not just ready for it; you're driving it. Happy coding!&lt;/p&gt;

&lt;p&gt;If you'd like to know more about AI and making it work for your business checkout my startup &lt;a href="https://erudii.com/" rel="noopener noreferrer"&gt;Erudii&lt;/a&gt;. I'm always looking for people to collaborate with!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;References:&lt;/em&gt;&lt;br&gt;
If you got stuck anywhere feel free to reach out. The &lt;a href="https://vercel.com/docs" rel="noopener noreferrer"&gt;Vercel documentation&lt;/a&gt; is excellent and the &lt;a href="https://github.com/vercel-labs/ai" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; is also easily clonable if you don't have time to code from the start and just want to get stuck in customising.&lt;/p&gt;

&lt;p&gt;The repo also includes a chat-with-functions route, a fantastic new feature covered in another &lt;a href="https://dev.to/stonediggity/level-up-your-chatbots-with-openai-function-calling-1a8b"&gt;blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>openai</category>
      <category>vercel</category>
      <category>nextjs</category>
      <category>react</category>
    </item>
    <item>
      <title>Claude 2, the ChatGPT competitor we've been waiting for.</title>
      <dc:creator>Liam Stone</dc:creator>
      <pubDate>Wed, 12 Jul 2023 05:49:41 +0000</pubDate>
      <link>https://forem.com/stonediggity/claude-2-the-chatgpt-competitor-weve-been-waiting-for-6aa</link>
      <guid>https://forem.com/stonediggity/claude-2-the-chatgpt-competitor-weve-been-waiting-for-6aa</guid>
      <description>&lt;p&gt;Image Credit: &lt;a href="https://www.anthropic.com/index/claude-2"&gt;Anthropic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next generation of chatbot technology is here, courtesy of Anthropics. Meet Claude 2, an artificial intelligence powerhouse that revolutionizes the landscape of AI chatbots with enhanced capabilities and state-of-the-art features.&lt;/p&gt;

&lt;p&gt;This innovative new model takes a significant leap from its predecessor. The advancements are not mere incremental enhancements, but groundbreaking improvements that redefine the chatbot domain. With longer response times, improved performance, and the ability to handle up to 100K tokens in each prompt, Claude 2 is the epitome of a game-changer.&lt;/p&gt;

&lt;p&gt;In terms of academic prowess, Claude 2 performs at a level akin to a high-achieving student. It's worth noting that this advanced model outperforms 90% of college students applying to graduate school on the GRE reading and writing exams. This is no small feat and demonstrates the powerful natural language processing capabilities of the model.&lt;/p&gt;

&lt;p&gt;Furthermore, Claude 2's aptitude extends to the legal domain, scoring an impressive 76.5% on the Bar exam's multiple-choice section. This unprecedented feat further highlights the extensive knowledge base and reasoning capabilities of Claude 2.&lt;/p&gt;

&lt;p&gt;The technological prowess of Claude 2 goes beyond language and reasoning skills. This sophisticated chatbot exhibits a remarkable aptitude for coding, as evidenced by a 71.2% score on the Codex HumanEval, a rigorous Python coding test. Moreover, on the comprehensive grade-school math problem set GSM8k, Claude 2 scored a notable 88.0%, demonstrating its prowess in mathematical computations.&lt;/p&gt;

&lt;p&gt;Crucially, Anthropics has ensured that the new model operates with an enhanced emphasis on safety. The company's extensive safety measures and testing have paid off, as Claude 2 is twice as effective at generating harmless responses as its predecessor, thereby minimizing the potential for inappropriate or harmful outputs.&lt;/p&gt;

&lt;p&gt;The professional world has begun to take note of Claude 2's capabilities. Many businesses, including generative AI platform Jasper and code AI platform Sourcegraph, have already incorporated the Claude 2 API into their operations, demonstrating the model's robustness and adaptability in a range of applications.&lt;/p&gt;

&lt;p&gt;There's so much to unpack with Claude 2 but I did get started asking it why it was better than Chat GPT and it's response was surprising humble and insightful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- I don't have a strong opinion on whether you should use me or ChatGPT. We are different AI assistants with our own strengths and weaknesses. Here are some things to consider:
- I was created more recently by Anthropic with a focus on being helpful, harmless, and honest. ChatGPT was created earlier by OpenAI with different design goals.
- I have less training data than ChatGPT, so there may be some topics I'm less knowledgeable about. However, I also may make fewer mistakes or say fewer incorrect things.
- ChatGPT is more widely used right now, so you may find more documentation and community support around it. I'm still newer so have a smaller user base.
- My conversations aim to be honest and transparent about what I can and cannot do as an AI. ChatGPT aims to have more human-like conversations.
- I'm focused on being safe and beneficial, while there are concerns ChatGPT could be misused to spread misinformation or harm.
- Overall, which AI is "best" depends on your priorities and what you're looking for in an AI assistant. The most important factors are likely capabilities, knowledge, thoughtfulness, and safety/transparency - not which specific company created the AI. Trying both could help determine which is better suited for your needs.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now available in the US and the UK, Claude 2 is set for further expansion in the coming months. However, while this chatbot represents a significant advance in AI technology, it's important to remember that it is not infallible. Users should exercise caution and refrain from using Claude 2, or any AI, in contexts involving physical or mental health and well-being.&lt;/p&gt;

&lt;p&gt;In conclusion, Claude 2 stands as a testament to the progress being made in the field of AI chatbot technology. Its launch represents a significant step forward and opens up an array of exciting opportunities for both individuals and businesses.&lt;/p&gt;

</description>
      <category>anthropic</category>
      <category>llm</category>
      <category>chatgpt</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
