Skip to content

Instantly share code, notes, and snippets.

@sanskarfc
Created May 17, 2025 18:12
Show Gist options
  • Select an option

  • Save sanskarfc/5e56cf5dfdf1bd975a33b6e1cdb59776 to your computer and use it in GitHub Desktop.

Select an option

Save sanskarfc/5e56cf5dfdf1bd975a33b6e1cdb59776 to your computer and use it in GitHub Desktop.
basic llm calls with qna - prd1

Basic LLM Calls with QnA

The user will enter the data structures and algorithms doubt they have in the text box and press enter

image.png

This question will then be sent to openai and we extract a structured output from openai. Let’s think about the structured output we want.

Miscellaneous things we want to add:

  • Add openai key to .env (leave it empty for now, I will add)
    • Use this openai key for LLM related tasks
  • Add a dropdown (similar styling as the whole app - doodly and outlined) to select models (below models only for now):
    • GPT 4.1 Nano
    • GPT 4o Mini

What do we want:

  1. User enters the DSA problem
  2. Our system tells the solution (for this, we want to create a schema for the output we want from openai):
    • Intuition of the solution
      • Where does this intuition comes from
        • What would be the first thought after reading the constraints
        • What would be the first thought after reading the problem
          • Draw a mermaid diagram diagram for this
          • Render the mermaid diagram in the canvas section on the right
    • Explanation of the solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment