CEO & Team Lead
June 18, 2025
You start with 10 channels. Then it becomes 50. Then you start marking things “read” just to feel less guilty. News gets duplicated, some posts get deleted, important stuff gets lost.
I’ve been through it myself. So I said: enough. We need something that collects information, understands what it’s about, and answers questions like:
RAG = Retrieval-Augmented Generation — an AI approach where the model doesn’t just “make things up” but pulls facts from a database and uses them in responses. It’s a combo of “search + generation.”
Result:
async function getEmbedding(text) {
const {
data: [{ embedding }],
} = await openai.embeddings.create({
model: 'text-embedding-3-small',
input: text,
encoding_format: 'float',
});
return embedding;
/* This function sends text to OpenAI to get an embedding —
a numeric representation of meaning.
For example, “Oil prices rose” and “Crude became more expensive”
will have similar vectors. */
}
async function findSimilarPosts(query, top_k = 20) {
const vector = await getEmbedding(query);
const results = await qdrant.search('tg_posts', {
vector,
limit: top_k,
});
return results.map((r) => ({
id: r.id,
score: r.score,
text: r.payload.text,
}));
/* What this function does:
1. Converts the user's query into a vector.
2. Searches Qdrant for posts with semantically similar meaning.
3. Returns a list of posts ranked by similarity. */
}
Feature | Keyword Search | RAG Search |
---|---|---|
Search basis | Word matching | Semantic understanding |
Synonyms support | No | Yes (e.g. “IT” vs “tech”) |
Typos / awkward wording | Fails | Tolerant |
Hallucination risk | No, but weak answers | No — answers are grounded in data |
Requires exact phrasing | Yes | No |
Back then:
Now:
This lets you spin up a working MVP in a week — exactly how we built ours.
How much does it cost?
$10–30/month: for VPS + OpenAI API. Cheaper with local models.
Is it legal?
Yes, we only parse public Telegram channels via the official userbot — no hacks involved.
What if a channel deletes a post?
We track post date and ID. If it’s gone — we still know it existed.
Can it analyze sentiment and tone?
Yes — we calculate sentiment scores and show trends over time.
We can build your MVP in 2–3 weeks. Connect your channels, tweak the visuals, no endless meetings or bureaucratic overhead.
Telegram: @madmaterials_bot
Email: team@madmaterials.com
CEO & Team Lead