Skip to content

Integrate OpenAI's GPT to explain why option selected is correct or wrong. #55

@kendricksin

Description

@kendricksin

Users want to know why their selection is incorrect or why another answer is better
It may not be easy to find clear answers addressing the question directly on search

Provide the question, answer, and wrong/correct answer as prompt into Gemini 1.5

import google.generativeai as genai

genai.configure(api_key="YOUR_API_KEY")
model = genai.GenerativeModel("gemini-1.5-flash")
response = model.generate_content("
  Explain why the correct answer and wrong answer to the following question
  Which GCP Service provides distributed SQL storage and database?
  WRONG: Cloud SQL
  CORRECT: Cloud Spanner
  ")
print(response.text)

Copy pasting the question and answer into Gemini
Gemini Flash 1.5 is free and it has at least a decent knowledge of GCP, if we can bring Gemini to users that would be great, perhaps in future we could use Google SSO and let users pay for more expensive accurate models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions