Pseudolang Prompts Unleashed
  • 🖥️Introduction to pseudoLang Prompts
    • Purpose of pseudoLang for ChatGPT
    • Benefits of using pseudoLang
    • Limitations and considerations
  • 🏗️Basic Syntax and Structure
    • Defining Functions
  • Specifying Input Types and Output
  • Indicating Actions and Steps
  • Nesting and loops
  • 🎯Examples of pseudoLang Functions
    • Sample Functions
  • 🌟Tips for Writing Effective Pseudolang Prompts
    • Provide Clear Instructions
  • Defining Input and Output Requirements
  • Using Appropriate Syntax and Formatting
  • Experimenting with Different Phrasings
  • Verifying and Refining Generated Outputs
  • 🧠Advanced pseudoLang Techniques
    • Creating Custom Functions
  • Combining Multiple Functions
  • Handling Errors and Exceptions
  • Guiding the Model with Additional Context
  • 🔚Conclusion and Next Steps
    • Further Resources and Learning
    • Community Contributions and Collaboration
  • Ongoing Development and Future Updates
Powered by GitBook
On this page

Specifying Input Types and Output

When using pseudoLang with ChatGPT, it's essential to be explicit about the input types and the expected output format of the functions you define. This helps the AI understand your prompt requirements and generates a more relevant and accurate response.

Input types refer to the kind of data you expect the AI to work with when processing your prompt. Common input types include:

  • str: A string or a sequence of characters (e.g., text, sentences, or words)

  • int: An integer or a whole number (e.g., 5, 42, or -3)

  • Float: a data type used to represent real numbers, which can include fractions or decimal values

  • List: A collection of items that can be of any data type (e.g., a list of strings, integers, or even other lists)

When defining a pseudoLang function, specify the input types in the function definition. For example:

summarize(text: str, length: int) -> str

In this function, the text is a string input, and the length is an integer input. The "-> str" part indicates that the function should return a string as its output.

The desired output format refers to how you want the AI to structure its response. You can indicate this by providing examples, specifying a template, or describing the format in your prompt.

For example, if you want a list of items as the output, you could define the function as:

list(topic: str, count: int) -> List[str]

Here, the "-> List[str]" part tells the AI that the expected output is a list of strings. Providing this information in the function definition helps the AI to generate a response that matches your requirements.

By clearly indicating input types and the desired output format in your pseudoLang prompts, you improve the AI's understanding of your requirements, which in turn increases the likelihood of receiving more relevant and accurate responses.

PreviousDefining FunctionsNextIndicating Actions and Steps

Last updated 2 years ago