Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Web Security TippsNew manual calculation setting in Google Sheets(21.09.2026 um 20:54 Uhr)
Videos & KonferenzenTechquickie: The Steam Frame Shouldn't Work - Here's Why It Does(21.09.2026 um 21:17 Uhr)
Sichere ProgrammierungHow to Build a Production-Ready iOS App With AI-Generated Code(21.09.2026 um 21:00 Uhr)
Sichere ProgrammierungAfriex Integrations: Sandbox, Idempotency, and Webhook Simulation(21.09.2026 um 21:50 Uhr)
Sichere ProgrammierungBridging Local and Cloud Databases for Centralized Data Management(21.09.2026 um 21:51 Uhr)
Web Security TippsNew manual calculation setting in Google Sheets(21.09.2026 um 20:54 Uhr)
Videos & KonferenzenTechquickie: The Steam Frame Shouldn't Work - Here's Why It Does(21.09.2026 um 21:17 Uhr)
Sichere ProgrammierungHow to Build a Production-Ready iOS App With AI-Generated Code(21.09.2026 um 21:00 Uhr)
Sichere ProgrammierungAfriex Integrations: Sandbox, Idempotency, and Webhook Simulation(21.09.2026 um 21:50 Uhr)
Sichere ProgrammierungBridging Local and Cloud Databases for Centralized Data Management(21.09.2026 um 21:51 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building a RAG Chatbot with React/Angular, Node.js, pgvector, and OpenAI

Most chatbots are lying to your users. Not maliciously — but when a user asks "why does useEffect run twice in React?" and the bot confidently gives a generic answer that has nothing to do with your course content, that’s a failure. 👉 The…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Most chatbots are lying to your users.



Not maliciously — but when a user asks "why does useEffect run twice in React?" and the bot confidently gives a generic answer that has nothing to do with your course content, that’s a failure.



👉 The bot doesn’t know your product. It just sounds like it does.



Basic Chatbot vs RAG



So I built a RAG (Retrieval-Augmented Generation) chatbot that answers using real data instead of guessing.



👉 Full Details: https://jsden.com/projects/rag-chatbot









The Problem



Basic chatbot:



User → LLM → Response



Issues:




  • Hallucinations

  • Generic answers

  • No product awareness









The Fix: RAG



New flow:



User → Retrieve → Context → LLM → Response



Instead of guessing, the model answers using your data.









Tech Stack




  • Frontend: React / Angular

  • Backend: Node.js (Express)

  • DB: PostgreSQL + pgvector

  • Embeddings: OpenAI

  • LLM: GPT-4









How It Works






1. Chunking






function chunkText(text, size = 500) {
const chunks = [];
for (let i = 0; i < text.length; i += size) {
chunks.push(text.slice(i, i + size));
}
return chunks;
}












2. Embeddings






const embedding = await openai.embeddings.create({
model: "text-embedding-3-small",
input: chunk
});












3. Retrieval






SELECT content
FROM documents
ORDER BY embedding <-> $1
LIMIT 5;












4. Prompt






const prompt = `
Use the context below:

${chunks.join('\n\n')}

Question:
${question}
`
;












Challenges




  • Chunk size tuning

  • Retrieval accuracy

  • Hallucination control

  • Prompt design









Result
























Before After
Guessing Grounded answers
Generic Context-aware
Demo Production








Final Thought



AI is not about calling APIs.



👉 It’s about connecting intelligence with your data.



That’s what RAG does.






👉 Full breakdown + working chatbot:


https://jsden.com/projects/rag-chatbot

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building a RAG Chatbot with React/Angular, Node.js, pgvector, and OpenAI

Thematisch verwandte Begriffe: Building, Chatbot, with, ReactAngular · 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-94497 | jshERP through 3.6 fails to validate object ownership in by-id info, upd…
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