Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungKI half beim Finden: iOS 27 schließt mehr als 100 Sicherheitslücken(21.09.2026 um 06:00 Uhr)
Sichere ProgrammierungWhat Is Rowhammer? How Can Repeated Memory Access Flip Bits in RAM?(21.09.2026 um 07:12 Uhr)
Sichere Programmierungnpm publish Ignores .gitignore: The .npmignore Override Rule(21.09.2026 um 07:15 Uhr)
Sichere ProgrammierungAphelion Editor - A free node-based video / VFX editor(21.09.2026 um 07:21 Uhr)
Sichere ProgrammierungGovernance Attack Surface Review: OKX(21.09.2026 um 07:31 Uhr)
Sichere ProgrammierungJSM Portal Request Create Property Panel Submit(21.09.2026 um 07:34 Uhr)
Reverse Engineeringsearch instructions assembly easy (X86,RISCV,AARCH64,etc)(20.09.2026 um 15:44 Uhr)
Sichere ProgrammierungKI half beim Finden: iOS 27 schließt mehr als 100 Sicherheitslücken(21.09.2026 um 06:00 Uhr)
Sichere ProgrammierungWhat Is Rowhammer? How Can Repeated Memory Access Flip Bits in RAM?(21.09.2026 um 07:12 Uhr)
Sichere Programmierungnpm publish Ignores .gitignore: The .npmignore Override Rule(21.09.2026 um 07:15 Uhr)
Sichere ProgrammierungAphelion Editor - A free node-based video / VFX editor(21.09.2026 um 07:21 Uhr)
Sichere ProgrammierungGovernance Attack Surface Review: OKX(21.09.2026 um 07:31 Uhr)
Sichere ProgrammierungJSM Portal Request Create Property Panel Submit(21.09.2026 um 07:34 Uhr)
Reverse Engineeringsearch instructions assembly easy (X86,RISCV,AARCH64,etc)(20.09.2026 um 15:44 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Fix for OpenAI returning same response for same prompt

Reagiere als Erste:r — dein Feedback zählt!

I have been working on a trivia app so that I can revise my concepts on software engineering since I am currently preparing for interviews.

The idea was simple - I was using the openai API to get me a question with 4 options, a correct answer and some explanation regarding it.

I displayed this in a form where you can then practice by clicking on the right option. A simple project.

The only problem was that OpenAI kept sending the same response.

Image description

I tried telling it to not repeat the same question by tweaking the prompt a bit but it didn't seem to work.

Finally this is what I had to do -

Topics - I made an array of topics and picked one topic at random from the array and sent it with the prompt. And now openAi started giving new responses. Not saying they are not repeated anymore but it much much better.

Here is the prompt -

{
  role: 'system',
  content: `Youareahelpfulassistantwhoiscreatingaquizapplicationrelatedto${
    topic
  }ingeneral.Trynottorepeatthetopicsfrompreviousquestions.`,

},
{
  role: 'user',
  content: `Createaquizquestionwith4optionsandonecorrectanswer.Thequestionshouldberelatedtotechnology.Itshouldhave4options.Itshouldhave1correctoption.Itshouldalsohaveasmalldescriptionorexplanationoftheanswer.TheresponsewillbeintheformofaJSONobjectwiththefollowingstructure: {
    question: "What is the capital of France?",
    options: [
      "Paris",
      "London",
      "Berlin",
      "Madrid"
    ],
    answer: "Paris",
    explanation: "Paris is the capital of France."
  }Donotincludeanyothertextorexplanation.`,

}

If you guys want to check out the page here you go - https://express-quiz-app-4qqz.onrender.com/

Am constantly trying to improve on this as a hobby.

Thank you if you have reached so far. Have a good day!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Fix for OpenAI returning same response for same prompt

Thematisch verwandte Begriffe: OpenAI, returning, same, response · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94109 | openEQUELLA versions before 2026.1.0 contain a remote code execution vul…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick