Generative Development Framework
GDF.ai
  • Intro to GDF-FSE
    • Generative AI, Large Language Models, ChatGPT?
    • Knowledge Areas
    • Access a Chat Based LLM
    • Why GDF?
    • Expectations
  • Limitations
  • Prompting
    • Prompt Patterns
    • Prompt Context
    • Prompt Stores
    • Prompt Operators
    • Prompt Chaining
  • Security
    • Protecting Data
    • Protecting Application Security
    • Protecting Intellectual Property
    • Protection Stores
    • AI Security Assessments and Penetration Testing
    • Social Engineering Testing with AI
  • Subject Knowledge Areas
    • Ideation
      • Identifying a Problem Statement
      • Plan and Prioritize Features
      • Develop User Stories
      • Requirement Gathering
      • Ideation Prompting
      • Ideation Template
    • Specification
      • Specifying Languages
      • Specifying Libraries
      • Specifying Project Structures
      • Specify Schemas
      • Specifying Elements
      • Specifying API Specs
    • Generation
      • Generating UI Elements
      • Generating Mock Data
      • Generating Schemas
      • Generating Parsers
      • Generating Databases
      • Generate Functions
      • Generate APIs
      • Generate Diagrams
      • Generating Documentation
    • Transformation
      • Converting Languages
      • Converting Libraries
    • Replacement
      • Replacing Functions
      • Replacing Data Types
    • Integration
      • Connecting UI Components
      • Connecting UI to Backend
      • Connecting Multiple Services Together
      • Connecting Cloud Infrastructure (AWS)
    • Separation
      • Abstraction
      • Model View Controller (MVC)
    • Consolidation
      • Combining UI Elements
      • Deduplicating Code Fragments
    • Templating
      • Layouts
      • Schemas
      • Project Structures
      • Content Management Systems
    • Visualization
      • General Styling
      • Visual Referencing
      • Visual Variations
    • Verification
      • Test Classes
      • Logging and Monitoring
      • Automated Testing
      • Synthetic Monitoring
    • Implementation
      • Infrastructure
      • DevOps / Deployment
    • Optimization
      • General Optimization
      • Performance Monitoring
      • Code Review
  • Guidance
    • Business Process
    • Regulatory Guidance
  • Generative Pipelines
  • Troubleshooting
    • Client Side Troubleshooting
    • Server Side Troubleshooting
    • Troubleshooting with AI
    • Documentation
    • Infrastructure Engineering
  • Terminology
Powered by GitBook
On this page
  • Prompt Operator Example
  • Prompt
  • Response

Was this helpful?

Export as PDF
  1. Prompting

Prompt Operators

Understanding how to use prompt operations to include, exclude or merge prompts and their contexts together.

Prompt operators allow conditional statements to be applied to commands, target, and or specifiers.

Prompt Operator Example

Prompt

prompt: 
create a navigation bar or drawer for a bicycle rental web app in react chakra ui

Response

Here's an example of how you can create a navigation bar using React Chakra UI:

import { Box, Flex, Link, Text } from "@chakra-ui/core";

const Navbar = () => (
  <Flex
    as="nav"
    align="center"
    justify="space-between"
    wrap="wrap"
    padding="1.5rem"
    bg="teal.500"
    color="white"
  >
    <Flex align="center" mr={5}>
      <Text fontSize="xl">Bicycle Rental</Text>
    </Flex>

    <Box display={{ sm: "block", md: "none" }} onClick={toggle}>
      <svg
        fill="white"
        width="12px"
        viewBox="0 0 20 20"
        xmlns="http://www.w3.org/2000/svg"
      >
        <title>Menu</title>
        <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
      </svg>
    </Box>

    <Box
      display={{ sm: show ? "block" : "none", md: "flex" }}
      width={{ sm: "full", md: "auto" }}
      alignItems="center"
      flexGrow={1}
    >
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Home
      </Link>
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Bikes
      </Link>
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Rentals
      </Link>
    </Box>
  </Flex>
);

export default Navbar;

This creates a navigation bar with the name "Bicycle Rental", a menu icon for small screens, and links for "Home", "Bikes", and "Rentals". You can adjust the styles to match your desired design.

The operator in the above prompt is “or” and is used in the target of the request.

Operators in prompting are typically synonymous with operators in programming languages or applications that use formulas.

Examples of Operators:

  • AND

  • IN

  • OR

  • EQUALS

  • LESS THAN

  • GREATER THAN

  • NOT IN

  • CONTAINS

PreviousPrompt StoresNextPrompt Chaining

Last updated 3 months ago

Was this helpful?