🔧 ProgrammierungBolt.new launches Forge to widen who gets to build with AI(17.09.2026 um 22:12 Uhr)
🔧 ProgrammierungGlobal Workspace Theory The J-Space of Claude(17.09.2026 um 22:12 Uhr)
🔧 AI Nachrichten I let a local 27B LLM audit and fix my Splunk + Sysmon stack(17.09.2026 um 22:15 Uhr)
🔧 ProgrammierungHow to Run Docker/Containers With Termux(17.09.2026 um 22:20 Uhr)
🔧 ProgrammierungI Accidentally Built a Dark Software Factory. Here's How.(17.09.2026 um 22:21 Uhr)
🔧 ProgrammierungCongrats to the DEV Weekend Challenge: Dog Days Edition Winners!(17.09.2026 um 22:22 Uhr)
🔧 ProgrammierungBolt.new launches Forge to widen who gets to build with AI(17.09.2026 um 22:12 Uhr)
🔧 ProgrammierungGlobal Workspace Theory The J-Space of Claude(17.09.2026 um 22:12 Uhr)
🔧 AI Nachrichten I let a local 27B LLM audit and fix my Splunk + Sysmon stack(17.09.2026 um 22:15 Uhr)
🔧 ProgrammierungHow to Run Docker/Containers With Termux(17.09.2026 um 22:20 Uhr)
🔧 ProgrammierungI Accidentally Built a Dark Software Factory. Here's How.(17.09.2026 um 22:21 Uhr)
🔧 ProgrammierungCongrats to the DEV Weekend Challenge: Dog Days Edition Winners!(17.09.2026 um 22:22 Uhr)
🔧 Programmierung 🕛 vor 4 Monaten 3 Min Lesezeit
0

Claude + Groq Hybrid LLM — AI University Memory Agent

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Claude + Groq Hybrid LLM — AI University Memory Agent



After each learning session in AI University, a Memory Agent automatically builds a structured learner profile — weak providers, strong providers, preferred learning style. Next session, quizzes are personalized based on that profile.



The trick: two models, two jobs — Claude Sonnet for deep profile extraction, Groq Llama for real-time quiz scoring.






Architecture






CODE
Session ends
→ learner.update_profile (Edge Function)
→ Claude Sonnet → structured JSON profile
→ UPSERT into ai_university_learner_profiles

Quiz answer submitted
→ quiz.evaluate (Edge Function)
→ Groq Llama 3.3 70B → JSON score {result, confidence}
→ fallback: string match









Memory Agent — Claude Extracts the Profile






CODE
// supabase/functions/ai-hub — learner.update_profile
const prompt = `Extract a structured learner profile from this session data.
Session summary:
${sessionSummary}
Score data:
${JSON.stringify(scores).slice(0, 2000)}
Return JSON: {"weak_providers":["..."],"strong_providers":["..."],"preferred_style":"visual|text|voice","insights":"..."}`
;

const claudeResp = await fetch("https://api.anthropic.com/v1/messages", {
body: JSON.stringify({
model: "claude-sonnet-4-6",
max_tokens: 512,
messages: [{ role: "user", content: prompt }],
}),
});

// Strip code fences before parsing
const rawText = claudeData.content[0].text;
const profile = JSON.parse(rawText.replace(/```
{% endraw %}
json\n?|\n?
{% raw %}
```/g, "").trim());






Save to Supabase:




CODE
await admin.from("ai_university_learner_profiles").upsert({
user_id,
weak_providers: profile.weak_providers ?? [],
strong_providers: profile.strong_providers ?? [],
preferred_style: profile.preferred_style ?? "text",
profile_json: profile,
total_sessions: (existing?.total_sessions ?? 0) + 1,
}, { onConflict: "user_id" });









Quiz Evaluator — Groq Scores Answers Fast






CODE
// quiz.evaluate — Groq Llama 3.3 70B, JSON mode
const groqResp = await fetch("https://api.groq.com/openai/v1/chat/completions", {
body: JSON.stringify({
model: "llama-3.3-70b-versatile",
max_tokens: 100,
temperature: 0,
response_format: { type: "json_object" }, // guaranteed JSON
messages: [{
role: "user",
content: `Question: ${question}\nExpected: ${correctAnswer}\nUser: ${userAnswer}
Score: {"result":"correct|incorrect|partial","confidence":0-100}`
,
}],
}),
}).catch(() => null);

// Groq failure → fallback to exact string match
if (!groqResp || !groqResp.ok) {
const match = userAnswer.trim().toLowerCase() === correctAnswer.trim().toLowerCase();
return json({ result: match ? "correct" : "incorrect", confidence: 100, fallback: true });
}









Why Two Models?























Task Model Reason
Learner profile extraction Claude Sonnet 4.6 Complex reasoning, structured JSON quality
Quiz scoring Groq Llama 3.3 70B Low latency, high volume, free tier


Claude runs once at session end. Groq runs on every quiz answer. Matching the model to the task cuts costs without sacrificing quality.






DB Schema






CODE
CREATE TABLE ai_university_learner_profiles (
user_id uuid PRIMARY KEY REFERENCES auth.users,
weak_providers text[] DEFAULT '{}',
strong_providers text[] DEFAULT '{}',
preferred_style text DEFAULT 'text',
profile_json jsonb DEFAULT '{}',
total_sessions int DEFAULT 0,
updated_at timestamptz DEFAULT now()
);









Key Takeaways





  1. Assign models by strength — Claude for deep analysis, Groq for speed


  2. response_format: json_object — eliminates JSON parse errors from Groq


  3. Strip code fences — Claude wraps JSON in json → strip before JSON.parse


  4. Always fallback — Groq outage shouldn't break quiz scoring



Building in public: https://my-web-app-b67f4.web.app/






FlutterWeb #Supabase #buildinpublic #LLM #FlutterTips

Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Bolt.new launches Forge to widen who gets to build with AI
1 Quelle
Common Pitfalls in RAG Applications: What to Avoid When Using Vector Search and Embeddings
1 Quelle
Turn Your Android Phone Into a Local Development Server With Termux
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Claude + Groq Hybrid LLM — AI University Memory Agent

Thematisch verwandte Begriffe: Claude, Groq, Hybrid, University · 6 Treffer

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 ...