Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosŠkoda Peaq im Fahrest: DAS hätten wir nicht erwartet! | CHIP(21.09.2026 um 00:00 Uhr)
Sichere ProgrammierungBackups and other lies(20.09.2026 um 23:42 Uhr)
Sichere ProgrammierungOur linter's "safe" autofix would have silently disabled RBAC(20.09.2026 um 23:54 Uhr)
Sichere ProgrammierungTeaching our on-device assistant to say "I don't know"(20.09.2026 um 23:55 Uhr)
Sichere ProgrammierungThe Tracker Is the Spine(21.09.2026 um 00:02 Uhr)
YouTube Security VideosŠkoda Peaq im Fahrest: DAS hätten wir nicht erwartet! | CHIP(21.09.2026 um 00:00 Uhr)
Sichere ProgrammierungBackups and other lies(20.09.2026 um 23:42 Uhr)
Sichere ProgrammierungOur linter's "safe" autofix would have silently disabled RBAC(20.09.2026 um 23:54 Uhr)
Sichere ProgrammierungTeaching our on-device assistant to say "I don't know"(20.09.2026 um 23:55 Uhr)
Sichere ProgrammierungThe Tracker Is the Spine(21.09.2026 um 00:02 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-93957 | A vulnerability has been found in olivier-ls PHP-FTS up to 1.1.3. This a…
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