Prompting options

In a Freddy AI context, a prompt is a specific input, use case or an instruction provided to our generative language model to elicit a desired response. Prompts serve as a way for you to interact with and instruct the Freddy AI model, guiding it to generate text or code that aligns with your inputs.

In this section, you'll delve into the art of effectively communicating with Freddy AI Copilot for Developers through prompts. Understand the different types of prompts you can use, including queries, requests for code snippets, and problem-solving prompts. Learn how to structure your prompts to get precise and context-aware responses from Freddy AI Copilot for Developers. This foundation will empower you to initiate meaningful interactions with the AI extension.

Prompt types

The effectiveness of your prompt depends on its clarity, specificity, and relevance to the code or content you want Freddy to generate. A well-crafted prompt can help steer Freddy toward producing desired and coherent outputs.

At a high level the prompts can take various forms, including:

  1. Text Prompts: These are written instructions or questions given to the Freddy AI model. For example, if you want to generate a form to capture some inputs on a Ticket details page of Freshdesk, then your prompt might be something like

    Capture customer mailing address, locality and landmark against each ticket inside Freshdesk using Crayons form. Display the captured output
  2. Code Prompts: In the context of programming, you can use code prompts to instruct the AI model to generate code snippets or scripts. For instance, you might provide a code prompt like,

    Here is my `manifest.json`, change it to appear in contact details page and in global sidebar as a full page app
    {
      "platform-version": "2.3",
      "product": {
        "freshdesk": {
          "location": {
            "ticket_sidebar": {
              "url": "index.html",
              "icon": "styles/images/icon.svg"
            }
          },
          "requests": {},
          "events": {},
          "functions": {}
        }
      }
    }
  3. Dialogue Prompts: When generating conversational responses, you can provide a dialogue prompt that includes a series of messages or turns, simulating a conversation. Each message in the dialogue prompt corresponds to a speaker (e.g., user or AI assistant) and contains the text of the message.

    Prompt 1:

    Generate a form to capture email id, department and name of employee

    Prompt 2:

    Modify the form to capture additional information such as job title and career level such as IC1, IC2, IC3 etc

    Prompt 3:

    Capture the form data and display success notification on each submission using interface methods

Interaction options

Info:

Freddy AI Copilot for Developers is currently under beta. This guide is designed with version v2.0.2. The uses shown here are subject to change with upcoming releases.

There are various ways to interact with Freddy. As part of productivity enhancements we are adding even more such options to the equation. Let's understand a few.

Via Conversation to code

The Conversation to Code feature in Freddy, enables developers to seamlessly transform plain text conversations into functional code within the Freshworks app ecosystem. By simply describing your app requirements, you can efficiently generate code templates that expedite the app development process.

It can be opened via one of the three options

  1. Via "Ask Freddy" option
  2. Via "New Conversation" option
  3. By clicking on Freddy AI Copilot for Developers extension from an existing Freshworks App

Via Use case to app

The Use Case to App feature in Freddy empowers you to swiftly translate their specific use cases and requirements into fully-fledged Freshworks apps. By providing natural language descriptions of your app needs, you can leverage AI-driven assistance to expedite app development. At times if your use case is simple enough Freddy can generate a fully functional app for you in matter of minutes.

It can be opened by clicking on "Start building apps from scratch" option available when Visual Studio Code extension is opened

  1. in an Empty directory
  2. without any active workspace
  3. inside a workspace with a Non-Freshworks App

Via Right Click Options

No developer likes doing mundane redundant tasks over and over again. We understand that and we value your time. To speed up the development process and to reduce the developer overhead, we have provided several productivity options for developers as listed below.

  1. Freddy: Explain selection
  2. Freddy: Refactor selection
  3. Freddy: Review selection
  4. Freddy: Generate documentation
  5. Freddy: Generate code comments

Each of these feature appear as right click options after selecting a code segment inside a file in Visual Studio Code workspace. When selected an option, it passes the selection to Freddy intrinsically to perform the selected operation.