Building Custom Memory Classes in LangChain for Conversation Management
While LangChain provides several built-in memory implementations, you may encounter scenarios where you need a custom memory type tailored to your specific application requirements. This guide demonstrates how to implement a custom memory class and integrate it with LangChain's ConversationChain.
Prerequisites
For this implementation, you'll ne ...
Posted on Wed, 27 May 2026 21:32:54 +0000 by websitesca
Implementing Outcome and Card Name Generation Function (option_outcome_generator.py)
In each round of the game "Fentasy Realm," after a player makes a choice, two things need to be generated:
Narrative Outcome: A description of the immediate consequences of the choice, enhancing immersion.
Card Information: If a card is obtained (determined by the card acquisition algorithm), generate a card name and a brief descript ...
Posted on Fri, 22 May 2026 20:18:23 +0000 by chordsoflife
Environment Setup Guide for LangChain v0.3 and Xinference Deployment
Deploying a RAG system using the latest LangChain v0.3 alongside the Xinference inference framework requires careful environment isolation. To avoid dependency conflicts between the orchestration layer and the model backend, its best practice to maintain separate virtual environments. Below is a technical breakdown of the configuraton process a ...
Posted on Sun, 17 May 2026 16:42:26 +0000 by dheeraj
Introduction to Vector Stores and Embeddings with LangChain
In this post, we explore vector stores and embeddings, which are crucial components for building chatbots and performing semantic search on data corpora.
Workflow
Recall the entire workflow of Retrieval Augmented Generation (RAG):
We start with documents, create smaller splits of these documents, generate embeddings for these splits, and store ...
Posted on Sun, 17 May 2026 07:35:31 +0000 by rallen102
Implementing a Nursing Expert Chatbot with OpenAI Embeddings
Initial Approach with Fine-Tuning
Attempted fine-tuning using internal nursing knowledge documents to create a specialized model. The process involved:
Segmenting Word documents into logical chunks
Generating Q&A pairs using text-davinci-003
Training a custom model with OpenAI's fine-tuning API
Document Segmentation Code
import docx
impor ...
Posted on Sat, 16 May 2026 20:20:28 +0000 by jeff_lawik
Building a Personal Knowledge Assistant with LangChain and Gradio
This implementation creates a personal knowledge assistant by integrating LangChain for retrieval-augmented generation with a Gradio-based user interface. The system allows users to query a custom knowledge base while optionally enabling contextual retrieval to enhance response accuracy and reduce model hallucinations.
Environment Setup
Python ...
Posted on Thu, 14 May 2026 19:56:45 +0000 by kimbeejo
Implementing Layer Event Generation with LLM Integration
In the game "Mystic Realm," after completing each non-BOSS layer, players encounter an inter-layer event. This event presents a special scenario where players can make choices to potentially earn a wildcard card. The task involves implementing a function called generate_layer_event that utilizes the Deepseek large language model to dy ...
Posted on Thu, 14 May 2026 02:29:10 +0000 by ade234uk
Building LLM-Powered Applications with LangChain: A Beginner's Guide
API calls often involve extended execution times, delivering outputs progressively as they're generated
Unlike structured inputs with defined parameters (e.g., JSON), they process unstructured, free-form natural language, comprehending its nuances
Results are nondeterministic - identical inputs may yield different outputs
LangChain emerges as ...
Posted on Tue, 12 May 2026 16:56:52 +0000 by chadu
Advanced Retrieval-Augmented Generation Patterns for Production LLM Systems
Current RAG Landscape
Retrieval-Augmented Generation has evolved far beyond simple vector search. The latest survey "Retrieval-Augmented Generation for Large Language Models" highlights three active areas of innovation:
Query-side augmentation (query transformation)
Agentic orchestration of retrieval
Post-retrieval refinement
Self-R ...
Posted on Tue, 12 May 2026 13:54:23 +0000 by Kane250
Text Splitters in LangChain: Breaking Down Documents for LLM Processing
When working with extensive text documents, it's essential to divide them into manageable pieces. While this might appear straightforward, numerous complexities arise. Ideally, we want to maintain semantically related text segments together, though what constitutes "semantic relevance" can vary based on the document type. This article ...
Posted on Sun, 10 May 2026 02:18:28 +0000 by Desertwar