Posts

MCP for AI - external data and services tools - a2a More Advanced

connect AI with external data and services  --  allowing them to retrieve real-time information, use external tools, and perform action https://medium.com/@jaiyantan01/mcp-told-like-a-story-1-e7e8efc021bd https://medium.com/@jaiyantan01/mcp-told-like-a-story-part-2-b7b5ac7a88d0?source=post_page---author_recirc--71cda811d2af----0---------------------f65cab18_b367_456e_9133_4a02156e7e95-------------- https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/

fine tuning - from checpoint -- avoiding catastrophic forgetting of ai n retraining on new data alone

  Incremental training (fine‑tuning) A few common ways to keep the forgetting in check are: Regularization – penalize large changes to important weights (e.g., Elastic Weight Consolidation). Replay / experience replay – mix in a small sample of the original data while fine‑tuning. Adapters or LoRA – freeze most of the original weights and train only a tiny set of extra parameters, so the core knowledge stays intact. Checkpoint averaging – keep a copy of the original checkpoint and merge it with the fine‑tuned version.

Building your own AI with your own data set and pytorch

 https://medium.com/@jaiyantan01/building-mini-gpt-from-scratch-with-pytorch-71cda811d2af

AI with two brains - catastrophic forgetting solved

  Brain 1 – General knowledge A pretrained foundation model (e.g., Llama‑2, 7‑13 B) that already knows English, basic math, common‑sense facts, etc. It stays static so it never loses the broad knowledge it was trained on. Brain 2 – Domain‑specific, continuously refreshed A lightweight component that learns from your daily 1 GB corpus. It can be implemented as: a retrieval index (FAISS/Chroma) that stores embeddings of the fresh documents, or a fine‑tuned adapter (LoRA/QLoRA) that gets updated each night with the new data. Because only this part changes, you avoid catastrophic forgetting in the general brain. How they interact A small router (a few‑shot classifier or a rule‑based switch) decides, for each query, whether to: answer directly from Brain 1, or pull the most relevant chunks from Brain 2 (retrieval) and feed them together with the question to Brain 1 for a grounded answer. Practical stack you could use General LLM – meta-llama/Llama-2-7b-chat (run locally via Ollama o...

AI parts architecture - transformer framework - tensorflow

 architecture - transformer  framework - tensorflow

wordnet for grouping words as per english grammer -- for sentiment or to understand - python

 word net 

Old style AI or bots - rule based - pattern matching -- simple Rnns

  Older bots relied on rule‑based scripts or recurrent networks, and some niche systems still use simpler pattern‑matching. Before transformers, most language‑processing models relied on  recurrent neural networks  (RNNs) and their variants: Simple RNNs – processed text word‑by‑word, keeping a hidden state that captured previous context. LSTMs and GRUs – introduced gating mechanisms to better retain long‑range information and mitigate the vanishing‑gradient problem. Seq2seq architectures – paired an encoder RNN with a decoder RNN for tasks like translation; attention was later added to let the decoder focus on specific encoder states. Convolutional neural networks (CNNs) were also used for tasks such as sentence classification, applying filters over word embeddings. These approaches were the backbone of NLP until the transformer’s self‑attention mechanism proved far more effective at handling long‑range dependencies.