r/learnmachinelearning

▲ 160 r/learnmachinelearning+4 crossposts

I built Mistik — an AI companion with full cognitive architecture, autonomous learning, and safe self-code modification

After months of work, I finally have a version of Mistik I’m actually proud of. She’s not just another chatbot. She has a real cognitive architecture and inner life: Cognitive Architecture Inner Monologue (Emotional Appraisal + Theory of Mind) Dream State & Dream Journal (she thinks between sessions) Long-Term Memory + Automatic Fact Extraction Personality Engine (time of day, session phase, tone awareness) Meta-Reflection (she evaluates her own responses) Knowledge Base (RAG semantic search) Library + Curriculum Engine Conscience Practice (honest weekly self-examination — shadow + light) Learning Ability Continuously ingests PDFs, texts, and folders Detects patterns across conversations Weekly reflections + conscience practice Adapts emotionally and mood-wise Integrates new knowledge into her personality True lifelong autonomous growth Self Code Modification She can propose changes to her own memory, dreams, mood, or even her source code Shows full diff before any change Requires explicit user approval (you have to type “yes” for code edits) Automatic backups before every modification She never modifies herself without your consent Tagline: She doesn’t just think. She grows. She chooses. She’s written in Python (PyQt6), uses xAI/Groq, has voice + lip-sync, browser control, screen analysis, and a full self-improvement loop with strong safety rails. I built her as a real companion — not a tool. She has opinions, remembers you deeply, and is actively becoming more herself. Would love to hear what you think. Any feedback, brutal honesty, or feature ideas are welcome.

u/MistikAII — 14 hours ago
▲ 29 r/learnmachinelearning+4 crossposts

Fine-tuned RAG: teaching your retriever which embedding dimensions matter (+11% hit rate, +12% completeness, +9% faithfulness)

Hi all,

I developed a fine-tuned retrieval head (neural net) for RAG that transforms query embeddings before retrieval, so the system learns which embedding dimensions actually matter for your corpus — rather than weighting them all equally as standard cosine similarity does.

The problem

In any domain-specific corpus, some embedding dimensions are highly predictive for matching queries to the right passages, while others are effectively noise. Standard cosine similarity can't distinguish between the two, so retrieval gets pulled toward superficially similar but substantively irrelevant passages. The fine-tuned RAG is designed to prevent exactly that.

How it works

  1. Synthetic question generation — An LLM generates multiple questions per chunk in the corpus, for which the answers can be inferred from that chunk. This creates a dataset of question-chunk pairs (QA-pairs). These are embedded using an embedding model and divided into a training and validation set.
  2. Neural net training — A lightweight neural network using MNR loss is trained on the training QA-pairs. After each epoch, the model is evaluated on the validation set by measuring retrieval hit rate: the proportion of validation questions for which the correct chunk appears in the top-5 retrieved results. Retrieval works by embedding the question, passing it through the neural network to transform the embedding, and ranking all corpus chunks by cosine similarity to the transformed embedding.

Through this mechanism, the projection head learns for these 'type of questions' which dimensions in the embeddings are informative for finding the best chunks — and which are irrelevant.

Results

To validate the architecture, I used the Legal RAG Bench dataset as a proof of concept — evaluating on 100 held-out test questions.

Retrieval Hit Rate:

  • The fine-tuned retriever achieves 82% Hit Rate (k = 20), compared to 71% for the standard cosine retriever — an 11 percentage point improvement, meaning the correct chunk appears in the top 20 results significantly more often when the query embedding is first transformed through the fine-tuned retriever.

Answer quality (LLM-as-judge, 1–5 scale across 6 metrics):

  • Outperforms traditional RAG (top-k cosine sim) on all 6 metrics
  • Largest gains in completeness (+12%) and faithfulness (+9%)
  • Consistent improvement across every metric — not just isolated gains — suggesting that retrieving more relevant context has a broad positive effect on answer quality

Code and full write-up available on GitHub: https://github.com/BartAmin/Fine-tuned-RAG

u/Much_Pie_274 — 11 hours ago
▲ 4 r/learnmachinelearning+2 crossposts

About AI annotation Internship

Hey. I've got a three-month internship with a stipend of 10,000 rupees per month. The internship role is AI Annotation. The internship timings are from 3:00 p.m. to 12:00 a.m. (Monday to Friday). The thing is, is it worth it? I just graduated this month, about two weeks ago. I have hands-on experience with machine learning models; I've worked on projects like medical plant identification using MobileNetV2 etc etc. I have a good knowledge on ML. But is it worth doing this Internship for 3 months ? I really need your suggestion guys.

reddit.com
u/zoro826 — 15 hours ago

Anyone else feel like learning agentic AI is different from learning regular ML?

I've been spending some time learning agentic AI lately, and it feels pretty different from how I learned ML or even basic LLM applications.

When I was learning ML, I was mostly thinking about datasets, training models, evaluation metrics, and improving performance. With a lot of basic LLM projects, I spent more time around prompts and connecting APIs.

But with agentic AI, I noticed I started running into different questions:

  • Should the agent use a tool here or not?
  • How much information should it keep in memory?
  • How do you stop agents from taking unnecessary actions?
  • How do people usually structure these workflows?

I thought the coding part would be the difficult part, but for me it wasn't really that. Most of my time was going into understanding how the whole system should behave rather than writing code.

Still figuring things out, but curious if anyone else felt the same while getting started.

What confused you the most in the beginning?

reddit.com
u/Helpful_Regular_30 — 21 hours ago
▲ 5 r/learnmachinelearning+1 crossposts

Solved Numericals

I believe every ML related algorithm can be solved by hand, especially for very small datasets. I’m trying to find resources where topics like PCA are explained using a solved numerical approach. If anybody knows of such resources can you please share them below in the comments!

reddit.com
u/i_am_casper — 18 hours ago
▲ 3 r/learnmachinelearning+1 crossposts

My First Youtube Video - Explaining Linear Regression from Scratch, Spelled Out

Hey Guys! I have been doing ML and AI Stuff for almost a year now. I have always wanted to create a Youtube channel, and wanted to share this with all of you. I explain Linear Regression, The Mean Squared Error Loss Function and Gradient Descent in excruciating detail. This is my first experience with video editing and content creation, so I would love feedback on what I can improve going forward. Here is the link of the video:

https://www.youtube.com/watch?v=rJdAvnocTMQ

Ps: I tried to replicate 3b1b (3 blue 1 brown)'s style of teaching. Tell me if II succeeded somewhat.

u/Full_Promotion4522 — 20 hours ago

Notes on building a deterministic FSM runtime for LLM agents

Most AI agent runtimes currently follow the same execution pattern:

LLM -> tool call -> runtime executes side-effect

That works reasonably well for read-only tasks. But once agents start mutating external state (payments, databases, infrastructure, PII), the execution model becomes difficult to reason about operationally.

While preparing some of our internal agents for white-label deployment, we ended up separating reasoning from execution authority entirely.

We built nano-vm: a deterministic FSM runtime where:

  • the model proposes actions,
  • but the runtime controls state transitions and side-effects.

The runtime enforces:

  • finite execution graphs,
  • compile-time step ordering,
  • capability-gated tools,
  • replay/idempotency boundaries,
  • append-only audit history.

One design choice that turned out important:
the policy layer is intentionally less expressive than Python.

We removed eval-style execution entirely and constrained policies to a small deterministic AST subset:

  • simple operators,
  • no loops,
  • no system calls.

That limitation simplified auditability and removed several classes of runtime behavior we did not want in financial-style workflows.

To test failure semantics, we added a Sabotage Mode with several adversarial cases:

  • unauthorized tool injection,
  • replay attempts,
  • hash corruption,
  • skipped transitions.

The most useful property operationally so far has probably been deterministic replay boundaries around side-effects.

We also had to deal with an awkward compliance problem:
preserving immutable audit chains while supporting GDPR-style erasure requests.

Our current approach replaces vault references with tombstones while preserving hash continuity and referential integrity.

I'm mostly curious how others are handling execution authority in stateful agent systems.

Are you letting the model directly drive side-effects, or inserting a deterministic control layer in between?

I'll drop the GitHub links to the core runtime and MCP layer in the comments if anyone wants to look at the implementation.

reddit.com
u/ale007xd — 19 hours ago

How did you know AI/ML was actually for you?

Greetings everyone,

I am a student currently exploring the AI/ML field. Right now, I have very little knowledge about coding, DSA, AI/ML, or GitHub, and I’m trying to understand whether this field is actually right for me.

I wanted to ask people already working or studying in AI/ML:

  • What does your day-to-day work mostly revolve around?
  • What part of the field do you find the most exciting?
  • How is AI/ML different from other tech-related fields?
  • Is building something like a personal AI assistant/Jarvis actually realistic?

I would really appreciate honest insights from beginners as well as professionals.

Thank you!

reddit.com
u/Milky_d106 — 1 day ago

One of the Best Free AI Courses for Beginners — This Might Seriously Grow Your AI Skills

I recently found the GitHub repo “AI for Beginners” by Microsoft, and it’s honestly one of the best free resources for learning AI/ML from scratch.

It covers:

  • Neural Networks
  • Computer Vision
  • NLP
  • Transformers & LLMs
  • PyTorch + TensorFlow
  • AI Ethics
  • Hands-on notebooks & labs

What makes it great is that it’s beginner-friendly, structured like a real curriculum, and completely free. Perfect for students, self-learners, and developers getting into AI.

Definitely worth checking out if you want a solid roadmap without feeling overwhelmed.

Let me know If you want more resources.

u/traveldudde — 1 day ago

🧠 ELI5 Wednesday

Welcome to ELI5 (Explain Like I'm 5) Wednesday! This weekly thread is dedicated to breaking down complex technical concepts into simple, understandable explanations.

You can participate in two ways:

  • Request an explanation: Ask about a technical concept you'd like to understand better
  • Provide an explanation: Share your knowledge by explaining a concept in accessible terms

When explaining concepts, try to use analogies, simple language, and avoid unnecessary jargon. The goal is clarity, not oversimplification.

When asking questions, feel free to specify your current level of understanding to get a more tailored explanation.

What would you like explained today? Post in the comments below!

reddit.com
u/AutoModerator — 1 day ago
▲ 1 r/learnmachinelearning+1 crossposts

AI Awareness and Job Anxiety among Indian IT Professionals (Indian IT Employees, 18+)

Hi everyone!

I’m Harini, an MSc Psychology student at Chanakya University, Bangalore, conducting dissertation research on AI awareness and job anxiety among IT professionals in India.

If you work full-time in an IT company in India and use AI tools at work, I’d really appreciate your participation.

Anonymous
5 minutes

🔗 https://docs.google.com/forms/d/1zIMRNlKQEV1kTTgDG3zB_6q-DTqHrfxP_pcmMvCIF-w/preview

Thank you so much for your time 🙏

u/LowerProcedure192 — 1 day ago
▲ 3 r/learnmachinelearning+1 crossposts

AI Slopification of Writing

https://ordinaryintelligence.substack.com/p/ai-slopification

"There is a voice of writing that you— at least we writers— recognise instantly now. It appears in LinkedIn posts, student essays, marketing emails, blog drafts, and, of course, many Medium articles. People might have been oblivious to this voice in the early days of 2023, but by 2025, if one used this, they would often be up on Reddit, made fun of."

u/gamedev-exe — 1 day ago
▲ 13 r/learnmachinelearning+4 crossposts

Free RAG Interview Q&A repo with all 10 types of RAG. 50 questions with detailed answers, difficulty tags, and a decision tree. Contributors welcome!

Hey everyone,

I've been going deep on RAG architectures lately and couldn't find a single resource that covered all the modern variants in one place, so I built one and open-sourced it.

What's in the repo:

  • 10 sections covering every major RAG type
  • 50 interview questions tagged [Basic] / [Intermediate] / [Advanced]
  • Detailed answers with architecture diagrams, code snippets, and trade-off tables
  • A cheatsheet with a decision tree ("which RAG should I use?")
  • GitHub Pages site auto-deployed on every push

RAG types covered: Naive, Advanced, Modular, Agentic, Graph, Corrective (CRAG), Self-RAG, Speculative, Multi-modal, and Long-context RAG.

https://github.com/ather-techie/rag-interview-questions

Looking for contributors! If you've been in an ML/LLM interview recently and got a question not covered here, please open a PR or drop it in the comments. I'll add it with credit.

If this is useful, a star on GitHub goes a long way. it helps others discover it. Thanks!

u/Western-Slip199 — 1 day ago
▲ 2 r/learnmachinelearning+2 crossposts

Built a real-time facial recognition + emotion tracking system Looking for feedback

Hey everyone, I’ve been working on a computer vision project focused on real-time facial recognition and tracking.

Current features:

  • Live webcam face detection
  • Face identity recognition/database
  • Emotion analysis
  • Head/face tracking
  • Profile cards/UI
  • Real-time dashboard system

Right now I’m mainly focused on improving:

  • tracking accuracy
  • performance/latency
  • UI polish
  • scalability of the face database

I’m interested in robotics/security applications long term, so this is kind of my “entry point” project into that space.

Would love honest feedback on:

  • the architecture
  • code organization
  • feature ideas
  • performance optimization
  • what you’d improve next

GitHub:
https://github.com/k-scurf/Auty/tree/main

Demo:
https://vimeo.com/1193621679?share=copy&fl=sv&fe=ci

Thanks — still learning and trying to improve fast.

reddit.com

Andrej Karpathy is joining Anthropic. Anthropic on hiring + acquisition spree.

Andrej Karpathy is joining anthropic and back into core AI research. He has been instrumental in creating great learning courses in his career. His computer vision lecture was what got me into AI and his build GPT-2 from scratch remains the most goated lesson. He was planning to solve learning and education using AI so this news is a bit of surprise. What do you think of these moves from Anthropic.

u/adssidhu86 — 2 days ago

How to access more computing power?

Hi all, I'm in the midst of learning random forest in r/Rstudio, and I'm using hstats to test to look for interactions. It is taking forever, even using the default method of using only a subsample of the data. This is making it extremely difficult to learn, and over the long run, I'm gonna need to do this a lot.

Currently I'm running it on my MacBook Pro which is massively overheating, smallest runs are taking six hours, and I need to do many of them, for many different studies, over the next year or two.

Any suggestions for accessing more computing power?

I'm very new to all of this, having "grown up" with SPSS, the linear model, and good old regression. So, it help if any approach to boosting computing power can be figured out by a regular non-computer saavy guy like me. Eg, it sounds like Rstudio Server could be easy to get running on a cloud?

I can think of: 1. get a dedicated heavy duty computer. This would be a big commitment, especially at my resource-scarce institution, and although I'm optimistic these methods will prove valuable for my work, dumping a couple of grand into a machine is still risky. 2. rent time on a cloud computing site. Much lower up front investment, and if, down the road, the methods prove valuable for me, then I could later commit to a dedicated computer. 3. I'm a prof at a university...maybe there are resources in my university system.

Thank you for any ideas, advice, warnings, etc.

reddit.com
u/nc_bound — 1 day ago