<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pushpa Kanaujia on Medium]]></title>
        <description><![CDATA[Stories by Pushpa Kanaujia on Medium]]></description>
        <link>https://medium.com/@kanaujiapushpa?source=rss-b71d50e6cdb5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*n7A76cs6qjpudhlZ.jpg</url>
            <title>Stories by Pushpa Kanaujia on Medium</title>
            <link>https://medium.com/@kanaujiapushpa?source=rss-b71d50e6cdb5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 01:34:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kanaujiapushpa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I’ve been building Android apps for over a decade. Here’s why I/O 2026 felt different.]]></title>
            <link>https://medium.com/@kanaujiapushpa/ive-been-building-android-apps-for-over-a-decade-here-s-why-i-o-2026-felt-different-63611475aa2a?source=rss-b71d50e6cdb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/63611475aa2a</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[google-io-2026]]></category>
            <category><![CDATA[android-studio]]></category>
            <dc:creator><![CDATA[Pushpa Kanaujia]]></dc:creator>
            <pubDate>Sun, 24 May 2026 06:51:12 GMT</pubDate>
            <atom:updated>2026-05-24T07:05:39.891Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mdmnUg_BJJpwopwrYFrMAA.png" /></figure><p>This wasn’t a feature-drop keynote. It was a statement of direction — and if you’re serious about Android, you need to understand what just shifted under your feet.</p><p><strong><em>Jetpack Compose , Gemini in Studio,</em> </strong><a href="https://android-developers.googleblog.com/2026/05/android-cli-stable-1-0-agent-development.html"><strong><em>Android CLI</em></strong></a><strong><em>, MigrationAgent,</em> </strong><a href="https://www.android.com/xr/"><strong><em>Android -XR</em></strong></a><strong><em>, and Architecture</em></strong></p><p>I’ve sat through a lot of Google I/Os. Most years, the Android keynote is a mix of new APIs, Compose improvements, and performance wins — solid engineering announcements that filter into my workflow over the next six months. This year was different. The shift isn’t incremental. The tools, the workflows, the very mental model of what it means to “write Android code” — all of it is being renegotiated at once.</p><p>Here’s my honest breakdown of what matters most, and what I’m actually changing in how I work.</p><h3>1. The Android CLI + open-sourced skills: agents can now build Android apps properly</h3><p>This is the announcement I’ve been waiting for without knowing I was waiting for it. The stable Android CLI lets AI agents tap directly into the Android Studio toolchain — downloading the SDK, building and running apps on real devices, running instrumentation tests, all without a human in the loop.</p><blockquote>Google also open-sourced Android skills — codified best practices that teach LLMs how to handle complex workflows like migrating to Jetpack Compose or Jetpack Navigation 3. This is huge. It’s not just prompting; it’s giving models structured, verified playbooks for the hardest parts of Android work.</blockquote><p>In practice: any agent, any LLM, any tool of your choice can now do the heavy lifting that previously required deep Android expertise to even supervise. The expert judgment doesn’t go away — but the execution layer just got dramatically more accessible.</p><h3>2. The migration agent: weeks of work collapsing into hours New</h3><p>If you’ve ever migrated a large React Native or web-based project to native Android Kotlin, you know the pain. It’s not just rewriting code — it’s re-architecting state management, navigation, UI components, platform integrations. It takes weeks even for experienced teams, and it’s soul-crushing repetitive work.</p><p>Google previewed a migration agent in Android Studio that handles this automatically. Feed it a React Native app, a web framework app, or an iOS project — and it analyzes the code and produces a native Kotlin Android app. The demos show migrations that would’ve taken weeks completing in hours.</p><blockquote>My take: this isn’t a “move fast and break things” tool. The output still needs architectural review. But the ratio of senior judgment to junior execution just shifted dramatically in your favor. The cognitive load that used to absorb entire sprints gets delegated.</blockquote><h3>3. Android Bench: finally, a way to evaluate AI on Android-specific tasks New</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCOw_YEZMuF4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCOw_YEZMuF4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCOw_YEZMuF4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b424e5bb9283a27adde585e009a2e2a/href">https://medium.com/media/7b424e5bb9283a27adde585e009a2e2a/href</a></iframe><p>One problem I’ve had with using LLMs for Android work: general coding benchmarks don’t tell you how well a model understands Coroutines, Compose state hoisting, Hilt scoping, or WorkManager edge cases. Android has a deeply idiomatic API surface, and generic coding performance doesn’t predict domain-specific competence.</p><p>Android Bench is Google’s response — an LLM leaderboard specifically for Android development tasks. This week they added open-weight models including Gemma 4. Now you can make informed choices about which model to use inside your agent workflow based on actual Android performance, not proxies.</p><h3>4. Google AI Studio now codes native Android apps with Kotlin</h3><p>This is a workflow unlock, not just a feature. AI Studio now includes native Kotlin support — you can vibe-code Android apps directly in the browser. Combined with Firebase integration and one-click deploy to Cloud Run, it means you can go from idea to running full-stack Android backend in a single session.</p><p>The export to Antigravity path is the part I find most interesting. You build a prototype in Studio, export the full project state to Antigravity for more complex agent-driven development, and the handoff is seamless. That’s a real prototyping-to-production bridge that didn’t exist before.</p><h3>5. Compose isn’t optional anymore — and AI is the reason why</h3><p>I know this isn’t new news. But I/O 2026 closed the door on the debate. Every AI-assisted Android workflow Google demoed — migration agent output, AI Studio code generation, open-sourced Android skills — produces Compose UI. The open-sourced Android skills explicitly include a “migrate to Jetpack Compose” workflow.</p><p>If you’re still writing XML layouts as your primary approach, you’re not just working in a legacy paradigm — you’re now actively outside the surface area that AI tooling operates in. The practical implication: AI-generated code your team uses will be Compose. You need to be fluent enough to review it, modify it, and catch architectural mistakes in it.</p><blockquote>The composition model — state, recomposition scopes, side effects, `remember` vs `rememberSaveable` — matters more than ever because AI can generate Compose code that works but recomposes poorly. Catching that requires genuine understanding, not surface familiarity.</blockquote><h3>6. Android XR + Googlebook: the platform surface is expanding fast</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FHZioERCcZf8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHZioERCcZf8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FHZioERCcZf8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8697172a615d5fa59de4e2512e721d9d/href">https://medium.com/media/8697172a615d5fa59de4e2512e721d9d/href</a></iframe><p>Two new form factors were prominent at I/O: Android <strong>XR glasses</strong> and <strong>Googlebook</strong>, a premium Android-powered laptop category with deep Gemini integration. This is no longer just mobile. Android is becoming a serious multi-surface OS.</p><p>For developers, this means adaptive layouts and multi-window support stop being “nice to have for tablets” and become core product requirements. Compose’s adaptive layout APIs aren’t a side skill — they’re the foundation for shipping on every form factor Google is investing in.</p><h3>7. Architecture is now your competitive moat</h3><p>Here’s the uncomfortable truth that I/O 2026 crystallized for me: AI is very good at generating code that works. It’s genuinely poor at generating code that scales, stays maintainable across a year of feature development, and survives team growth from 2 engineers to 12.</p><p>Clean Architecture, MVVM, modularization, unidirectional data flow — these aren’t defensive complexity. They’re the scaffolding that lets you move fast with AI tooling without accumulating architectural debt that slows everything down six months later. The migration agent output will need architectural shaping. The AI-generated Compose screens will need proper ViewModel wiring. Someone has to do that work.</p><blockquote>The senior Android developer in 2026 is the person who knows exactly where AI output needs correction — and can course-correct it at the architectural level, not just the syntax level. That’s the skill that doesn’t get commoditized.</blockquote><p><strong>What we should change in our workflow</strong></p><blockquote>Starting now: integrating the Android CLI into agent setups, benchmarking models against Android Bench before committing to a stack, using the migration agent on a legacy module to understand its output quality firsthand, and deepening Compose performance knowledge — because that’s where AI review gaps show up most. I/O 2026 didn’t make Android development easier. It made the floor lower and the ceiling higher. The developers who understand the new tools well enough to guide them — and catch what they get wrong — are about to have a significant leverage advantage.</blockquote><p>Good news is Google is positioning Android Studio at the center of the AI development future.</p><p>Exciting times ahead for Android developers 🚀</p><p>#Android #AndroidDev #Kotlin #AI #AndroidStudio #GoogleIO #Gemini #JetpackCompose #DeveloperTools #AIAgents #AndroidEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63611475aa2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Intelligent Chatbot Using Retrieval-Augmented Generation (RAG) with LangChain and…]]></title>
            <link>https://medium.com/@kanaujiapushpa/building-an-intelligent-chatbot-using-retrieval-augmented-generation-rag-with-langchain-and-ed9e19acb34b?source=rss-b71d50e6cdb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed9e19acb34b</guid>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[ollama-api]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[chatbot-development]]></category>
            <dc:creator><![CDATA[Pushpa Kanaujia]]></dc:creator>
            <pubDate>Fri, 30 May 2025 12:32:26 GMT</pubDate>
            <atom:updated>2025-09-04T06:26:10.669Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Building an Intelligent Chatbot Using Retrieval-Augmented Generation (RAG) with LangChain and Ollama</strong></h3><p>Traditional chatbots have preset rules which make it inefficient with user queries also you may not be willing to share the data to AI models suppose you have some confidential information which is limited to an org or few people. This article will talk about how can you develop chatbot which will keep your data local to your system and will provide you answers based on the data you have provided, to achieve this we will be using RAG with Ollama and langChain</p><p><strong>What is Retrieval-Augmented Generation (RAG)? <br>Retrieval-Augmented Generation (RAG)</strong> is a method that improves how large language models (LLMs) answer questions by letting them look up trusted information before responding. Instead of relying only on what they learned during training, RAG allows them to search an external knowledge base (like documents, websites, or company files) to give more accurate and up-to-date answers. This means you don’t have to retrain the model — it just gets smarter by using better sources.</p><p><strong>Example:</strong><br> Imagine you have a chatbot for a tech support team. Instead of trying to guess answers from its general training, the bot uses RAG to search your company’s help docs or manuals. So when someone asks, “How do I reset my company email password?”, the bot finds the exact steps from your internal guide and shares that, giving a precise and helpful answer</p><p><strong>Retrieval-Augmented Generation (RAG)</strong> do this by combining document retrieval with a generative language model, allowing chatbots to respond accurately based on a custom knowledge base.</p><h4><strong>Prerequisites and Setup :</strong></h4><p><strong><em>if you want to run this in virtual Env follow these steps:</em></strong></p><ol><li>create python virtual environment — command :<br><strong>python3.12 -m venv</strong></li><li>activate python venv<strong> </strong>command: <br><strong>source venv/bin/activate</strong></li><li>when done<br><strong>deactivate</strong></li></ol><ul><li>install langchain, faiss-cpu, sentence-transformers, colorama, and other dependencies</li><li>An Ollama-compatible language model (like LLaMA 3)</li></ul><p>Folder structure:</p><pre>project/<br>├── docs/            # Contains your .docx files<br>├── embedding.py     # Contains embedding model wrapper<br>├── timed.py         # Contains @function_timed decorator<br>└── app.py           # The main chatbot script</pre><h4><strong>Setup and Dependencies:</strong></h4><pre># Imports for dependencies<br>import os<br>from time import time<br>from langchain.prompts import ChatPromptTemplate<br>from langchain.text_splitter import RecursiveCharacterTextSplitter<br>from langchain_core.output_parsers import StrOutputParser<br>from langchain.schema.runnable import RunnableLambda, RunnableMap<br><br>from langchain_community.document_loaders import TextLoader<br>from langchain_community.vectorstores import FAISS<br>from langchain_ollama import OllamaLLM<br><br>from embedding import FixedHuggingFaceEmbeddings<br>from timed import function_timed</pre><ul><li><strong>Standard libraries</strong>: os, timefor file handling, checking timing for each operation</li><li><strong>LangChain</strong>: For building prompt templates, text processing, chaining, and output parsing.</li><li><strong>Community integrations</strong>: Used to load .docx files and FAISS vector store.</li><li><strong>OllamaLLM</strong>: Interface for running a local LLM via Ollama.</li><li><strong>Custom modules</strong>: embedding and timed are local Python modules (e.g., FixedHuggingFaceEmbeddings wraps sentence transformer embeddings; function_timed decorates functions to time their execution).</li></ul><h4><strong>Step-by-Step Explanation :</strong></h4><p>This Python script builds a chatbot that can answer user queries based on a custom collection of .docx documents. It uses <strong>LangChain</strong> for chaining operations, <strong>FAISS</strong> for vector-based similarity search, <strong>HuggingFace embeddings</strong>, and <strong>Ollama LLM</strong> for generating responses.</p><h4>Step1:<strong> Load and Split Documents</strong></h4><pre>@function_timed<br>def load_documents(doc_folder: str = &quot;./docs/&quot;):<br>    if not os.path.exists(doc_folder):<br>        raise FileNotFoundError(f&quot;[ERROR] Document folder not found: {doc_folder}&quot;)<br><br>    all_docs = []<br>    for filename in os.listdir(doc_folder):<br>        if filename.endswith(&quot;.docx&quot;):<br>            filepath = os.path.join(doc_folder, filename)<br>            loader = TextLoader(filepath)<br>            all_docs.extend(loader.load())<br><br>    text_splitter = RecursiveCharacterTextSplitter(chunk_size=200, chunk_overlap=50)<br>    return text_splitter.split_documents(all_docs)</pre><ul><li>Loads .docx files from the ./docs/ folder in your system.</li><li>Splits the documents into manageable chunks using <strong>RecursiveCharacterTextSplitter</strong>, preserving overlap for context continuity.</li><li>The decorator @function_timed logs execution time, useful for performance monitoring.</li></ul><h4><strong>Step2: </strong>Initialise the Embedding Model</h4><pre>embedding_model = FixedHuggingFaceEmbeddings(model_name=&quot;sentence-transformers/all-MiniLM-L6-v2&quot;)</pre><ul><li>Converts text chunks into vector representations using a <strong>HuggingFace SentenceTransformer</strong> model, which is language model that can <strong>turn sentences into embeddings</strong></li><li>we are using all-MiniLM-L6-v2 because of its small size,It’s widely used for tasks like <strong>semantic search</strong>, <strong>text similarity</strong>, and <strong>clustering</strong>.</li><li>Embeddings are crucial for FAISS to perform similarity searches.</li></ul><h4>Step3: Load or Create FAISS Index</h4><p><strong>FAISS</strong> (Facebook AI Similarity Search) is a <strong>library for fast searching</strong> in large collections of <strong>vector data</strong>. It’s designed to help you <strong>quickly find similar items</strong>, like documents, images, or sentences, based on their <strong>vector embeddings</strong>.</p><pre>@function_timed<br>def get_vector_db(index_path: str = &quot;faiss_index&quot;):<br>    if os.path.exists(index_path):<br>        print(Fore.YELLOW + &quot;[INFO] Loading existing FAISS index...&quot;)<br>        return FAISS.load_local(index_path, embedding_model, allow_dangerous_deserialization=True)<br><br>    print(Fore.YELLOW + &quot;[INFO] FAISS index not found. Creating a new one...&quot;)<br>    start_time = time()<br>    documents = load_documents()<br>    db = FAISS.from_documents(documents, embedding_model)<br>    db.save_local(index_path)<br>    print(Fore.RED + f&quot;[INFO] FAISS index created and saved. Indexing took {time() - start_time:.2f} seconds.&quot;)<br>    return db<br>    </pre><p>Checks for a pre-saved FAISS index. If it exists, it loads it.</p><p>if not : <br> Load documents</p><p>Converts them to embeddings,</p><p>Creates a FAISS index,</p><p>Saves it for future use.</p><h4>Step 4: Load the Ollama Language Model</h4><pre>def load_llm():<br>    return OllamaLLM(<br>        model=&quot;llama3.2:latest&quot;,<br>        temperature=0.5,<br>        num_ctx=1024,<br>        verbose=False<br>    )</pre><ul><li>Initializes the LLM served by <strong>Ollama</strong>, running locally.</li><li>temperature controls randomness; lower values make answers more deterministic.</li><li>num_ctx defines context window size (how much text the model can &quot;see&quot;).</li></ul><h4><strong>Step 5: Create RAG Chain (Prompt + Retrieval + Generation)</strong></h4><pre>@function_timed<br>def create_rag_chain(retriever, llm):<br>    system_prompt = &quot;&quot;&quot;<br>    You are a knowledgeable assistant for mobile app developers.<br>    Use ONLY the information provided in the context below to answer the <br>    user&#39;s question as accurately as possible.<br>    Do NOT use any prior knowledge or make up information.<br>    If the answer is not found in the context, respond with exactly: &quot;I don&#39;t <br>    know.&quot;<br><br>    Context:<br>    {context}<br>    &quot;&quot;&quot;<br><br>    prompt = ChatPromptTemplate.from_messages([<br>        (&quot;system&quot;, system_prompt),<br>        (&quot;human&quot;, &quot;{question}&quot;)<br>    ])<br><br>    return (<br>        RunnableMap({<br>            &quot;context&quot;: lambda x: retriever.invoke(x[&quot;question&quot;]),<br>            &quot;question&quot;: lambda x: x[&quot;question&quot;]<br>        })<br>        | prompt<br>        | llm<br>        | StrOutputParser()<br>    )</pre><ul><li>Defines a <strong>system prompt</strong> that instructs the LLM to only use provided context.</li><li>Uses <strong>LangChain’s </strong><strong>ChatPromptTemplate</strong> for building structured prompts.</li><li>Builds a <strong>Runnable chain</strong>:</li><li>Maps input question → uses retriever to fetch top-k relevant documents.</li><li>Constructs a prompt with the retrieved context.</li><li>Sends prompt to the LLM.</li><li>Parses the model’s output into a clean string.</li></ul><p>This is the <strong>core of RAG architecture</strong>.</p><h4>Step 6: Chat Interface</h4><pre>@function_timed<br>def chat(rag_chain,question):<br>    result = rag_chain.invoke({&quot;question&quot;: question})<br>    print(Fore.GREEN + &quot;\nAnswer:\n&quot; + result)</pre><p>Accepts a question, passes it through the RAG chain, and prints the answer.</p><h4>Step 7: Main Logic</h4><pre>if __name__ == &quot;__main__&quot;:<br>    db = get_vector_db()<br>    retriever = db.as_retriever(search_kwargs={&quot;k&quot;: 2})<br>    llm = load_llm()<br><br>    rag_chain = create_rag_chain(retriever, llm)<br><br>    # Example usage<br>    while True:<br>        user_question = input(Fore.CYAN + &quot;\nAsk a question (or &#39;exit&#39;): &quot;)<br>        if user_question.lower() == &quot;exit&quot;:<br>            break<br>        chat(rag_chain,user_question)<br>    </pre><ul><li>Loads or builds FAISS index.</li><li>Converts it into a <strong>retriever</strong>.</li><li>Loads the LLM.</li><li>Creates the RAG chain.</li><li>Starts an interactive loop to ask questions until user types &#39;exit&#39;.</li></ul><p>Here is the Timed function which is used to measure the time for each operation</p><pre>import time<br>import functools<br>from colorama import Fore<br><br>def function_timed(func):<br>    @functools.wraps(func)<br>    def wrapper(*args, **kwargs):<br>        start_time = time.time()<br>        result = func(*args, **kwargs)<br>        end_time = time.time()<br>        elapsed = end_time - start_time<br>        print(Fore.RED + f&quot;\n{func.__name__} executed in {elapsed:.4f} seconds&quot;)<br>        return result<br>    return wrapper</pre><h3>Summary: What Does This Code Do?</h3><ol><li>Reads your .docx documents.</li><li>Splits them and turns them into vector embeddings.</li><li>Stores those vectors in a FAISS database.</li><li>When you ask a question, it retrieves the most relevant document chunks.</li><li>Sends those chunks as <strong>context</strong> to an LLM.</li><li>LLM answers only using that context — no hallucinations allowed!</li></ol><p>here is the link to project <a href="https://github.com/kanaujiapushpa/rag-chatbot-poc">https://github.com/kanaujiapushpa/rag-chatbot-poc</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed9e19acb34b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>