ResearchLens: Building an AI Research Assistant That Learns with Hindsight Memory
What if your AI research assistant could remember what you researched last week โ and use that knowledge to help you today?
Research is rarely a one-question activity.
A researcher may start by exploring a broad topic, discover a specific subfield, investigate several papers, compare methodologies, and eventually identify a new research direction.
Traditional AI assistants often treat these interactions as isolated conversations.
ResearchLens takes a different approach.
For the Hindsight hackathon, I extended ResearchLens with persistent memory using Hindsight, enabling the application to remember research interests and previous research activity and use that context during future interactions.
๐ฏ The Problem
Finding and understanding research literature can involve several repetitive steps:
Searching for relevant topics
Understanding research papers
Extracting methodologies and findings
Comparing different studies
Identifying research gaps
Deciding what to explore next
The bigger problem is that the researcher's context is often lost between interactions.
Imagine this workflow:
Day 1:
"I'm researching AI applications in healthcare."
Day 3:
"I'm particularly interested in medical imaging."
Day 7:
"What research direction should I explore next?"
A useful research assistant should understand that these questions are connected.
That's the problem ResearchLens aims to address.
๐ฌ Introducing ResearchLens
ResearchLens is an AI-powered research assistant designed to help users explore scientific literature more efficiently.
It provides capabilities such as:
AI-generated research briefs
Research paper analysis
Paper extraction and structured analysis
Paper-specific AI chat
Literature review generation
Research methodology analysis
Research findings and gap identification
For the hackathon, I added another capability:
Persistent research memory powered by Hindsight.
๐ง The Core Idea
Instead of treating every research query as completely independent, ResearchLens follows a continuous learning loop:
โโโโโโโโโโโโโโโโโโโโ
โ Research Query โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Hindsight Recall โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Existing Context โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Gemini AI โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Research Brief โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Hindsight Retain โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโ
โ Future Memory โ
โโโโโโโโโโโโโโโโโโโโ
This creates a simple but powerful loop:
Recall โ Understand โ Generate โ Retain โ Learn
๐๏ธ System Architecture
๐
Caption:
Figure 1 โ ResearchLens architecture with Hindsight-powered memory
You can use this architecture diagram:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ USER โ
โ Research Query / Question โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ResearchLens UI โ
โ React + TypeScript โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โ HTTP API
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Node.js + Express โ
โ Backend Server โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโดโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Hindsight โ โ Gemini AI โ
โ Memory โ โ Research Engine โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ
โ RECALL โ
โ โ
โโโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Personalized โ
โ Research Brief โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Hindsight RETAIN โ
โ Store new memory โ
โโโโโโโโโโโโโโโโโโโโ
๐ How Hindsight Is Used
The Hindsight integration has two main stages.
- RECALL โ Remember Before Answering
Before ResearchLens generates a research brief, the backend sends a contextual query to Hindsight.
For example:
"ResearchLens user's previous research interests, topics, preferences, and research history related to AI healthcare."
Hindsight returns relevant memories.
These memories are then included in the Gemini prompt.
Conceptually:
User Query
โ
Hindsight RECALL
โ
Relevant Memories
โ
Gemini Prompt
โ
Personalized Research Brief
This means the AI can take previous research activity into account rather than starting from zero.
- RETAIN โ Remember After Answering
After ResearchLens generates a research brief, the current research topic is retained in Hindsight.
For example:
ResearchLens user research history:
The user researched the topic
"AI applications in healthcare".
This indicates an interest in
"AI applications in healthcare"
and should be remembered for future
research assistance.
The memory is stored in the:
researchlens
Hindsight memory bank.
This creates the continuous learning cycle:
โโโโโโโโโโโโโโโ
โ User Query โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโ
โ RECALL โ
โโโโโโโฌโโโโโโ
โ
Previous Research
Context
โ
โโโโโโโโโโโโโ
โ Gemini AI โ
โโโโโโโฌโโโโโโ
โ
AI Response
โ
โโโโโโโโโโโโโ
โ RETAIN โ
โโโโโโโฌโโโโโโ
โ
New Research Memory
๐ป Implementation
ResearchLens uses the Hindsight TypeScript client on the backend.
The client is initialized using environment variables:
HINDSIGHT_BASE_URL
HINDSIGHT_API_KEY
HINDSIGHT_BANK_ID
The Hindsight SDK is kept on the server side, so the API key is never exposed to the browser.
The application contains two helper functions:
recallResearchMemory()
retainResearchMemory()
The recall function retrieves relevant previous memories.
The retain function stores new research activity.
This keeps the memory functionality separated from the rest of the ResearchLens application.
๐ธ ResearchLens Interface
๐
Your ResearchLens main/home/research dashboard.
Caption:
Figure 2 โ ResearchLens research workspace
The ResearchLens interface provides a central workspace for exploring research topics, generating research briefs, analyzing papers, and working with scientific literature.
๐ Generating a Research Brief
๐

ResearchLens after entering:
AI applications in healthcare
and displaying the generated research brief.
Caption:
Figure 3 โ AI-generated research brief
The research brief provides a structured overview of the selected topic, including key findings, methodologies, research questions, and other relevant research information.
๐ง Demonstrating Hindsight Memory
This is the most important screenshot in the article because it demonstrates the hackathon requirement.
Open:
https://researchlens-0aj1.onrender.com/api/hindsight/test
after you have performed a research search.
Capture the response showing:
{
"success": true,
"bankId": "researchlens",
"memoriesFound": 1,
"memories": [...]
}
Caption:
โ Hindsight successfully recalling ResearchLens research memory
Then explain:
After the user performs research, ResearchLens stores the research activity using Hindsight. The memory can subsequently be recalled through the Hindsight API and used as contextual information for future research interactions.
๐ The Learning Experience
The most important part of the project is not simply storing a piece of text.
It is demonstrating that memory becomes useful in later interactions.
Consider the following workflow:
Interaction 1
User:
AI applications in healthcare
ResearchLens generates a research brief.
Hindsight remembers:
User is interested in AI applications in healthcare.
Interaction 2
Later, the user explores:
Medical imaging research directions
ResearchLens can recall the previous healthcare-AI interest and use it as contextual information.
Interaction 3
The user asks:
What research area should I explore next?
Now the system has accumulated research context from previous interactions.
The goal is to move from:
AI that answers questions
to:
AI that understands an ongoing research journey.
โ๏ธ Technology Stack
Layer Technology
Frontend React
Language TypeScript
Build Tool Vite
Backend Node.js
API Framework Express.js
AI Google Gemini
Memory Hindsight
Memory SDK @vectorize-io/hindsight-client
Deployment Render
๐ Security Considerations
API credentials are kept on the backend using environment variables.
The following secrets are not committed to GitHub:
GEMINI_API_KEY
HINDSIGHT_API_KEY
Only .env.example containing empty placeholders is included in the repository.
This allows the project to be deployed without exposing private credentials.
๐ Why Hindsight Matters in ResearchLens
The interesting part of the project is not simply adding a database or storing previous questions.
The memory layer enables a different interaction model.
Without persistent memory
Query โ Answer
With persistent memory
Query
โ
Recall previous context
โ
Generate personalized answer
โ
Learn from current interaction
โ
Store memory
โ
Future query becomes more contextual
This makes memory an active part of the AI workflow rather than a passive storage layer.
๐ From One-Time Assistant to Long-Term Research Companion
ResearchLens can be viewed as a progression:
Traditional Search
โ
AI Research Assistant
โ
Context-Aware Assistant
โ
Memory-Enabled Assistant
โ
Long-Term Research Companion
The Hindsight integration is what enables ResearchLens to move toward the final stage.
๐งช What I Learned
The biggest lesson from building this project was that memory design is as important as prompt design.
When building a memory-enabled AI system, three questions become important:
What should the agent remember?
ResearchLens currently remembers research topics and research interests.
When should it recall?
Relevant memories are recalled before generating a new research brief.
When should it learn?
After completing a research interaction, new research activity is retained.
This creates a continuous memory lifecycle:
Remember โ Recall โ Reason โ Respond โ Retain
๐ฎ Future Improvements
The current implementation focuses on the core hackathon requirement while keeping the existing ResearchLens application intact.
Future versions could include:
๐ค User-specific memory
Instead of a shared demo memory bank, each user could have an isolated memory space.
๐ Explicit feedback
Users could tell ResearchLens whether a paper or recommendation was useful.
That feedback could become another memory signal.
๐ Research profiles
The system could gradually build a structured profile containing:
Research interests
Frequently explored topics
Preferred methodologies
Favorite research domains
Previously analyzed papers
๐งญ Research journey tracking
ResearchLens could visualize how a user's interests evolve over time.
๐ค Personalized recommendations
The accumulated research memory could be used to recommend:
Related papers
New research areas
Research gaps
Potential project ideas
๐ Project
Live Demo
ResearchLens:
https://researchlens-0aj1.onrender.com
Source Code
GitHub:
YOUR_GITHUB_REPOSITORY_LINK
Hackathon
AI Agents That Learn Using Hindsight
๐ฅ Demo
๐ PLACE VIDEO / DEMO LINK HERE
For the final article, you can embed your YouTube demo here.
Your demo should show:
- Open ResearchLens โ
- Search "AI applications in healthcare" โ
- Generate research brief โ
- Show Hindsight memory โ
- Perform another related interaction โ
- Show that previous context is recalled
The important thing is to show the memory changing the interaction, rather than spending most of the video explaining the UI.
๐ Conclusion
ResearchLens began as an AI-powered research assistant designed to make scientific literature exploration faster and more structured.
With Hindsight, it gains another important capability:
It can remember the research journey.
Instead of treating every interaction as an isolated request, ResearchLens can recall previous research interests and retain new information for future interactions.
The project demonstrates how persistent memory can turn an AI application from a simple question-answering system into a more continuous and personalized research companion.
ResearchLens doesn't just help you research.
It remembers what you research.
๐ Exact screenshots you should capture
You don't need 10โ15 screenshots. Five good screenshots are enough.
Screenshot Where to place it
1 Architecture diagram After System Architecture
2 ResearchLens main interface After ResearchLens Interface
3 Generated research brief After Generating a Research Brief
4 /api/hindsight/test showing memory After Demonstrating Hindsight Memory
5 Second interaction showing personalized/contextual response After The Learning Experience
Most important screenshot
It should show something like:
{
"success": true,
"bankId": "researchlens",
"memoriesFound": 1,
"memories": [
{
"type": "...",
"text": "The user researched the topic..."
}
]
}





Top comments (0)