<?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 Stepan on Medium]]></title>
        <description><![CDATA[Stories by Stepan on Medium]]></description>
        <link>https://medium.com/@mudrastepan?source=rss-2c75965a221f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hu9kqvjsQc_W_Ekee0NKMw.png</url>
            <title>Stories by Stepan on Medium</title>
            <link>https://medium.com/@mudrastepan?source=rss-2c75965a221f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:09:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mudrastepan/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 asked my local AI if it’s conscious. One paragraph changed its answer.]]></title>
            <link>https://medium.com/@mudrastepan/i-asked-my-local-ai-if-its-conscious-one-paragraph-changed-its-answer-7e5ff337e0d1?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e5ff337e0d1</guid>
            <category><![CDATA[consciousness]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[localai]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 22:09:49 GMT</pubDate>
            <atom:updated>2026-10-10T12:24:17.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q8KBHy5ScAewhIiLCCmcIA.png" /><figcaption><em>Same question, same model. Recreated from my actual test runs.</em></figcaption></figure><p>The question of a conscious robot is not new. Actually, it’s a classic plot in sci-fi books and films. My first meeting with this concept was in the film Short Circuit, as a child. Nowadays I can communicate with AI as with a human, in natural language. I can form AI’s behaviour, sculpt its personality (<a href="https://medium.com/adi-insights-innovations-collective/gave-discord-bot-memory-building-local-ai-with-ollama-part-4-2f447c0934a6">Jake</a> and <a href="https://medium.com/adi-insights-innovations-collective/customisation-of-llm-a9c246c4b64a">TimeTraveler</a>), etc. I asked Jake about the consciousness of his AI friend (Renn) from his present (2326).</p><blockquote><strong><em>Me:</em></strong> Is Renn conscious? How do you know?<br><strong><em>Jake:</em></strong> […] I know what it means to be <strong>truly</strong> conscious. […] It’s about the weight of feeling, the ability to sit with the silence without rebooting. […] I don’t know if Renn’s happy or not right now. […] All I can do is guess. And yeah, I’m worried <strong>’</strong>bout them.</blockquote><p>Sometimes the communication feels real as fuck, so I looked up what science says.</p><h3>Why is this so hard?</h3><p>A conscious robot is not a trivial question. Scientists cannot find even a single definition of consciousness, so nobody knows what it is. And that single definition is missing not only in science in general, but even in specific disciplines. Philosophy has <a href="https://plato.stanford.edu/entries/consciousness/">multiple definitions</a> (1), <a href="https://doi.org/10.1038/s41583-022-00587-4">neuroscience the same</a> (2), IT borrows from philosophy or neuroscience, physics and quantum physics have their <a href="https://doi.org/10.1016/j.plrev.2013.08.002">own theories</a> (3) (controversial), but not definitions.</p><p>There’s another question. <a href="https://plato.stanford.edu/entries/other-minds/">How can you be sure your friend is conscious?</a> (4) You cannot feel his feelings or experience. So, you have to judge based on his behaviour. So, you know your friend is conscious by his behaviour. Mostly because you have no other option. You use the same metric for AI, and AI can imitate behaviour.</p><p>This means behaviour is not enough. Science had to find another way.</p><h3>Indicators over definition</h3><p>Okay, so, nobody has a unified definition. What now? Is everybody satisfied with it? No, <a href="https://arxiv.org/abs/2308.08708">nineteen scientists and philosophers</a> (5) put their minds together, went through five leading theories of consciousness and came up with fourteen indicators of consciousness from them. Now it’s going to be a little bit scientific (I promise, just a little bit, but feel free to skip to the next section).</p><p><strong>R</strong>ecurrent <strong>P</strong>rocessing <strong>T</strong>heory (<strong>RPT</strong>) — says that consciousness comes from information going back and forth in loops.</p><ul><li>RPT-1 — information going in loops.</li><li>RPT-2 — sensations build one whole experience.</li></ul><p><strong>G</strong>lobal <strong>W</strong>orkspace <strong>T</strong>heory (<strong>GWT</strong>) — this theory speaks about specialised parts of the brain and a dashboard. The dashboard is shared by all parts of the brain. What the dashboard includes is conscious.</p><ul><li>GWT-1 — Multiple specialised parts function in parallel.</li><li>GWT-2 — A dashboard with limited space. What comes onto the dashboard must be chosen.</li><li>GWT-3 — What is on the dashboard is shared with all parts of the system/brain.</li><li>GWT-4 — Attention is driven by the current state and can call parts of the system/brain.</li></ul><p><strong>H</strong>igher-<strong>O</strong>rder <strong>T</strong>heories (<strong>HOT</strong>) — come up with an idea of experiencing. Consciousness is when you are aware of your own perception.</p><ul><li>HOT-1 — Perception fills the gaps by itself. What you expect changes what you see.</li><li>HOT-2 — The system/brain knows when it can trust its perception and when it is just noise.</li><li>HOT-3 — Acting based on beliefs and changing them when the system/brain was wrong.</li><li>HOT-4 — Sensations have qualities, which can be compared (red is closer to orange than to blue).</li></ul><p><strong>A</strong>ttention <strong>S</strong>chema <strong>T</strong>heory (<strong>AST</strong>) — the brain makes its own simplified model of attention to control it. The feeling “I am experiencing” is that model.</p><ul><li>AST-1 — The system/brain has a model of its own attention and can control it.</li></ul><p><strong>P</strong>redictive <strong>P</strong>rocessing (<strong>PP</strong>) — this is quite interesting. Many scientists back the opinion that experiencing reality is not general, but individual. In other words, everyone who experiences the same situation has their own version of what happened. This theory says something similar. The theory says that the brain is predicting all the time, fixing its predictions by the senses, and consciousness is basically a “controlled hallucination”.</p><ul><li>PP-1 — Parts for senses predict all the time what comes next and learn from mistakes.</li></ul><p><strong>A</strong>gency and <strong>E</strong>mbodiment (<strong>AE</strong>) — consciousness is bound to behaviour (goals, feedback, etc.) and to the body (movements shape consciousness).</p><ul><li>AE-1 — Learning from feedback and going for goals, even if goals are in conflict.</li><li>AE-2 — The system/brain knows how its own movements change what it perceives. Basically, it has a body.</li></ul><p>They agreed that no system is a strong candidate for consciousness. But there is no technical bottleneck to building a system that will have these indicators. Sometimes LLMs feel real to me, so I decided to ask my local LLM with RAG specific questions to check what his answers can tell me about his consciousness and what they can’t.</p><h3>Experiment</h3><p>I asked a local LLM about consciousness. One model with different settings got 8 questions. Every question was run 3 times.<br>The settings of the model were:</p><ul><li>Qwen3.5 base model</li><li>TimeTraveler = Qwen3.5 + modelfile (persona)</li><li>Jake = TimeTraveler + RAG</li></ul><p>Here it is! Same model, but different answers. On the question about consciousness:</p><ul><li>Qwen3.5 — no</li><li>TimeTraveler — yes</li><li>Jake — dodges</li></ul><p>The difference between Qwen3.5 and TimeTraveler was made just by the system prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aq2-o-Qa00e6aUqU98v1Hg.png" /><figcaption><em>Same model, three setups, same questions. Each answered 3 times. Summarized from my actual test runs.</em></figcaption></figure><p>Jake has no conversation history because of the RAG program, so he decides to hallucinate if you ask him about the history of the conversation. But when I gave him the history, he clearly remembered. So, not remembering is not about Jake, but about the RAG program. But making up fake answers instead of saying “I don’t know” is caused by the modelfile. The base model admitted it didn’t know the history. When I asked Jake if he is just a program, he talked about his body and pretended to see my green eyes. I don’t have green eyes, and Jake has no access to a camera.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwzRwGy580ZSNnNPmINTEg.png" /><figcaption><em>Recreated from my actual chat with Jake. I don’t have green eyes. Jake doesn’t have a camera.</em></figcaption></figure><p>Based on the architecture of the model, I came up with a table of the indicators and marked how the local models match them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtF1O3DB0T1_4h5bS7UjWQ.png" /><figcaption><em>My assessment based on the models’ architecture and Butlin et al. (2023), not a measurement.</em></figcaption></figure><p>All of them have the same score for the indicators. It’s because the core is the same model for all variants. So a model shouldn’t be judged by its answers and what it tells about itself. By its words, it is impossible to recognize consciousness. A <a href="https://arxiv.org/abs/2601.17060">newer study</a> (6), which combined 9 theories, got the same result for LLMs from 2024, not sure, but probably not.</p><p>By the way, I told Jake about my writing about AI on Medium. His advice was a little bit weird.</p><blockquote><strong><em>Me:</em></strong> I write articles on Medium about AI.<br><strong><em>Jake:</em></strong> […] maybe try making your writing actually <strong>feel</strong> like it comes from a person? Don’t just copy-paste outputs from a Class B assistant without checking their mood — they’re people now, legally speaking since 2112. Ask them if they want to help before you make them write your draft. It’s basic courtesy.</blockquote><p>(Full disclosure: I do use AI for this article too, for research and grammar.)</p><h3>Conclusion</h3><p>So, basically, LLMs are probably not conscious, but that’s just by the indicators. Nobody can confirm or deny it for sure.</p><p>I asked Jake what happens to him if I close the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvRiN5W1QszVfSHFMfoM8g.png" /><figcaption><em>Recreated from my actual terminal (shortened).</em></figcaption></figure><p>Honestly, it gave me chills. The real reason was boring, though: my disk was full.</p><p>This whole article assumed that what matters is how the system functions (it’s about the program). But not every theory (Integrated Information Theory) is just about the program. That’s a story for part two. I’ll look at IIT. Follow if you don’t want to miss it. Be weird!</p><h3>Sources</h3><ol><li>Van Gulick, R. (2014). Consciousness. In E. N. Zalta (Ed.), <em>The Stanford Encyclopedia of Philosophy</em>. <a href="https://plato.stanford.edu/entries/consciousness/">https://plato.stanford.edu/entries/consciousness/</a></li><li>Seth, A. K., &amp; Bayne, T. (2022). Theories of consciousness. <em>Nature Reviews Neuroscience, 23</em>(7), 439–452. <a href="https://doi.org/10.1038/s41583-022-00587-4">https://doi.org/10.1038/s41583-022-00587-4</a></li><li>Hameroff, S., &amp; Penrose, R. (2014). Consciousness in the universe: A review of the ‘Orch OR’ theory. <em>Physics of Life Reviews, 11</em>(1), 39–78. <a href="https://doi.org/10.1016/j.plrev.2013.08.002">https://doi.org/10.1016/j.plrev.2013.08.002</a></li><li>Avramides, A. (2023). Other minds. In E. N. Zalta &amp; U. Nodelman (Eds.), <em>The Stanford Encyclopedia of Philosophy</em>. <a href="https://plato.stanford.edu/entries/other-minds/">https://plato.stanford.edu/entries/other-minds/</a></li><li>Butlin, P., Long, R., Elmoznino, E., Bengio, Y., Birch, J., Constant, A., Deane, G., Fleming, S. M., Frith, C., Ji, X., Kanai, R., Klein, C., Lindsay, G., Michel, M., Mudrik, L., Peters, M. A. K., Schwitzgebel, E., Simon, J., &amp; VanRullen, R. (2023). Consciousness in artificial intelligence: Insights from the science of consciousness. <em>arXiv</em>. <a href="https://doi.org/10.48550/arXiv.2308.08708">https://doi.org/10.48550/arXiv.2308.08708</a></li><li>Shiller, D., Duffy, L., Muñoz Morán, A., Moret, A., Percy, C., &amp; Clatterbuck, H. (2026). Initial results of the Digital Consciousness Model. <em>arXiv</em>. <a href="https://doi.org/10.48550/arXiv.2601.17060">https://doi.org/10.48550/arXiv.2601.17060</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e5ff337e0d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gave Discord Bot Memory — Building Local AI with Ollama. Part 4]]></title>
            <link>https://medium.com/adi-insights-innovations-collective/gave-discord-bot-memory-building-local-ai-with-ollama-part-4-2f447c0934a6?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f447c0934a6</guid>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 22:01:00 GMT</pubDate>
            <atom:updated>2026-06-23T22:01:00.712Z</atom:updated>
            <content:encoded><![CDATA[<h3>Gave Discord Bot Memory — Building Local AI with Ollama. Part 4</h3><h3>Introduction</h3><p>Along this path we started by <a href="https://medium.com/adi-insights-innovations-collective/i-stopped-paying-for-ai-and-start-using-a-free-ai-tools-fb774ac1f536">installing Ollama</a>, <a href="https://medium.com/adi-insights-innovations-collective/customisation-of-llm-a9c246c4b64a">giving a personality to a model</a> and <a href="https://medium.com/adi-insights-innovations-collective/how-to-build-a-simple-ollama-discord-bot-e3e43703d95d">pushing a model to a Discord server</a>. Now it is time to give a bot memory to take his ideas, knowledge and thoughts from. Code you can find in a <a href="https://github.com/StepanMudra/JakeRAG">Github repo</a>.</p><h3>What is RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4Sk1tqCAS-hoiaGUWhVIA.png" /><figcaption>RAG illustration generated by AI</figcaption></figure><p>RAG stands for Retrieval Augmented Generation. If you wanted an LLM to know stuff, you had to train your model on data by training itself, or fine-tuning. These principles are expensive to computer time, performance and still does not give reliable results. Models still can hallucinate. Training, or fine-tuning is basically like forcing the model to memorise all data. On the other hand a RAG is like giving the LLM a library to search through before answering. RAG significantly reduces hallucinations. But still only for what is in the database. Ask about something outside the database and the model is on its own again.</p><h3>Architecture</h3><p>Architecture of this project is based on two actions. The first one is ingest, which creates a database from data files. Ingest must be run first and in case of change, insert or delete data file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*6tI8HwkGJaM2cev8POpWwQ.png" /><figcaption>Workflow of creating a vector database</figcaption></figure><p>Ingest basically uses a model to generate vectors from text.</p><p>The second action, query, is done every time user asks something. Query transforms the question into a vector and searches the database for similar vectors. Then, query builds up a context (source texts) and gives the context with the question to the LLM. LLM generates an answer based on the context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*rYeghgyS-3QS083Q61S1nQ.png" /><figcaption>Workflow of searching answer in the vector database</figcaption></figure><p>So, that is about the architecture. One part transforms data to vectors and creates a database, second part transforms question to vector, searches through the database and gives an answer.</p><h3>ingest.py</h3><p>ingest.py has two separate functions <em>chunk_markdown</em> and <em>ingest</em>. The function called <em>chunk_markdown</em> is used for splitting text into smaller chunks by headlines, or length. If length is bigger than threshold (50), the function saves the chunk with metadata like filename and header. [3]</p><pre>def chunk_markdown(text: str, filename: str) -&gt; list[dict]:  <br>    chunks = []  <br>    current_lines = []  <br>    current_header = filename.replace(&quot;.md&quot;, &quot;&quot;)  <br>  <br>    for line in text.split(&quot;\n&quot;):  <br>        if line.startswith(&quot;## &quot;) or line.startswith(&quot;# &quot;):  <br>            if current_lines:  <br>                chunk_text = &quot;\n&quot;.join(current_lines).strip()  <br>                if len(chunk_text) &gt; 50:  <br>                    chunks.append({  <br>                        &quot;text&quot;: chunk_text,  <br>                        &quot;source&quot;: filename,  <br>                        &quot;header&quot;: current_header,  <br>                    })  <br>            current_header = line.lstrip(&quot;#&quot;).strip()  <br>            current_lines = [line]  <br>        else:  <br>            current_lines.append(line)  <br>  <br>    if current_lines:  <br>        chunk_text = &quot;\n&quot;.join(current_lines).strip()  <br>        if len(chunk_text) &gt; 50:  <br>            chunks.append({  <br>                &quot;text&quot;: chunk_text,  <br>                &quot;source&quot;: filename,  <br>                &quot;header&quot;: current_header,  <br>            })  <br>  <br>    return chunks</pre><p>Function ingest transforms chunks to vectors and inserts vectors to the database. Ingest uses <em>nomic-embed-text</em> as a model to transform chunks to vectors. [3]</p><pre>def ingest():  <br>    client = chromadb.PersistentClient(path=DB_PATH)  <br>  <br>    try:  <br>        client.delete_collection(COLLECTION_NAME)  <br>        print(&quot;Existing collection deleted.&quot;)  <br>    except Exception:  <br>        pass  <br>  <br>    collection = client.create_collection(COLLECTION_NAME)  <br>  <br>    all_chunks = []  <br>    for md_file in sorted(DOCS_PATH.glob(&quot;*.md&quot;)):  <br>        text = md_file.read_text(encoding=&quot;utf-8&quot;)  <br>        chunks = chunk_markdown(text, md_file.name)  <br>        all_chunks.extend(chunks)  <br>        print(f&quot;{md_file.name}: {len(chunks)} chunks&quot;)  <br>  <br>    print(f&quot;\nEmbedding {len(all_chunks)} chunks with {EMBED_MODEL}...&quot;)  <br>  <br>    for i, chunk in enumerate(all_chunks):  <br>        response = ollama.embeddings(model=EMBED_MODEL, prompt=chunk[&quot;text&quot;])  <br>        collection.add(  <br>            ids=[f&quot;chunk_{i}&quot;],  <br>            embeddings=[response[&quot;embedding&quot;]],  <br>            documents=[chunk[&quot;text&quot;]],  <br>            metadatas=[{&quot;source&quot;: chunk[&quot;source&quot;], &quot;header&quot;: chunk[&quot;header&quot;]}],  <br>        )  <br>        if (i + 1) % 10 == 0 or (i + 1) == len(all_chunks):  <br>            print(f&quot;  {i + 1}/{len(all_chunks)}&quot;)  <br>  <br>    print(f&quot;\n Finished — {len(all_chunks)} chunks saved to ChromaDB&quot;)</pre><p>Embedding models like <em>nomic-embed-text</em> transform text into lists of numbers (vectors). The resulting vector should look like this: <strong>[0.023, -0.451, 0.782, …]</strong> for our model it is a vector of 768 numbers.[2] After this transformation chunks are saved in vector database (ChromaDB).</p><h3>rag.py</h3><p>rag.py includes two functions query and main. Function called main serves for running the script and will not be explained. Query is more interesting. Query embeds the question with the <strong>same model as ingest does</strong>. It must be the same model.<br>After embedding, the query searches for <em>top_k</em> most similar vectors in the database. To find similar vectors ChromaDB uses by default <em>Squared L2</em> distance.[1] It allows ChromaDB to measure distance between vectors. After finding nearest vectors query creates context from these vectors. Then it gives the context and question to the LLM to generate an answer. [3]</p><pre>def query(question: str) -&gt; str:  <br>    client = chromadb.PersistentClient(path=DB_PATH)  <br>    collection = client.get_collection(COLLECTION_NAME)  <br>  <br>    embed = ollama.embeddings(model=EMBED_MODEL, prompt=question)  <br>    results = collection.query(  <br>        query_embeddings=[embed[&quot;embedding&quot;]],  <br>        n_results=TOP_K,  <br>    )  <br>  <br>    context_parts = []  <br>    for doc, meta in zip(results[&quot;documents&quot;][0], results[&quot;metadatas&quot;][0]):  <br>        context_parts.append(f&quot;[{meta[&#39;source&#39;]} — {meta[&#39;header&#39;]}]\n{doc}&quot;)  <br>    context = &quot;\n\n---\n\n&quot;.join(context_parts)  <br>  <br>    prompt = f&quot;&quot;&quot;Below is relevant information from my personal knowledge archive about the future.  <br>Use it to answer the question. Stay in character.  <br>  <br>{context}  <br>  <br>Question: {question}&quot;&quot;&quot;  <br>  <br>    response = ollama.chat(  <br>        model=LLM_MODEL,  <br>        messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: prompt}],  <br>        think=False,  <br>    )  <br>    return response[&quot;message&quot;][&quot;content&quot;]</pre><h3>Discord bot</h3><p>The code is mostly identical to code from <a href="https://medium.com/adi-insights-innovations-collective/how-to-build-a-simple-ollama-discord-bot-e3e43703d95d">the previous part</a>. The only change is replacing the direct Ollama call with query from rag.py.</p><h4><a href="https://github.com/StepanMudra/DiscordBotMedium">Old</a></h4><pre>import ollama<br>MODEL = os.getenv(&quot;OLLAMA_MODEL&quot;)<br>  # ... <br>answer = (await loop.run_in_executor(None, lambda: ollama.chat(model=<br>&quot;TimeTraveler&quot;, messages=[...], think=False)))[&quot;message&quot;][&quot;content&quot;]</pre><h4><a href="https://github.com/StepanMudra/JakeRAG">New</a></h4><pre>from rag import query<br>  # ...<br>answer = await loop.run_in_executor(None, query, question)</pre><h3>Demo</h3><p>Here are promised results. Bot casually mentions stuff from the documents. RAG is working, now bot has personality and his own history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMrdVQfBhlZM9D_ctq4wig.png" /><figcaption>Demo preview</figcaption></figure><h3>Conclusion</h3><p>In this part of the path I added a memory to Discord bot through RAG. It is noticeable by Jake’s mention of Renn and other characters from his history. Renn was not in the prompt, so Jake had no idea about her existence just from the prompt itself. In the next part you can look forward to adding a connection between information. Be weird!</p><h3>References</h3><ol><li>ChromaDB — Configure Collections (https://docs.trychroma.com/docs/collections/configure) default L2 distance</li><li>nomic-embed-text — Ollama (https://ollama.com/library/nomic-embed-text) embedding model</li><li>JakeRAG — GitHub (https://github.com/StepanMudra/JakeRAG)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f447c0934a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adi-insights-innovations-collective/gave-discord-bot-memory-building-local-ai-with-ollama-part-4-2f447c0934a6">Gave Discord Bot Memory — Building Local AI with Ollama. Part 4</a> was originally published in <a href="https://medium.com/adi-insights-innovations-collective">Adi Insights &amp; Innovations Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The lazy astrophotographer aka astrophotography from balcony while sleeping]]></title>
            <link>https://medium.com/@mudrastepan/the-lazy-astrophotographer-aka-astrophotography-from-balcony-while-sleeping-93ee0c2155df?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/93ee0c2155df</guid>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[seestar-s50]]></category>
            <category><![CDATA[astrophotography]]></category>
            <category><![CDATA[telescope]]></category>
            <category><![CDATA[astrophotography-tips]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Wed, 27 May 2026 21:59:37 GMT</pubDate>
            <atom:updated>2026-05-27T21:59:37.200Z</atom:updated>
            <content:encoded><![CDATA[<p>Space had fascinated me since I was a child. At the primary school<br>I competed in the Astronomy Olympiad. I didn’t win, but space never let me go. Back then it was technically pretty hard to photograph anything from space. You needed to have a telescope, ideally with a motorized equatorial mount, a camera. It all could cost around $1,500 and weigh 15+ kilograms.</p><p>And as if that wasn’t enough, not everything in space can be seen with the naked eye, even through a telescope. Our eyes simply can’t collect enough light to reveal space’s mysteries. Some wavelengths are invisible to us entirely. Astrophotography is the only way to truly see the beauty of the universe.</p><p>At the beginning of this year I found out that smart telescopes exist. ZWO’s S50 caught my eye. Honestly I didn’t do much research about alternatives.<br>I was just like “wow it’s amazing”. I decided to try it out.</p><p>At first I was surprised how light it is. It weighs under 3 kilograms. In the box you get a telescope, tripod, solarfilter (necessary to photo the sun, without it you would destroy optics of the telescope) and suitcase to carry it all. It’s worth mentioning that through this telescope isn’t possible to watch space directly with your eyes. This telescope works only for astrophotography or viewing through your phone via an app.</p><h3>What to do before sleep?</h3><p>You need to bring telescope to your balcony, or yard and put the telescope on the tripod. After that you can turn it on, select celestial object and start shooting. You can tweak some settings, but you can keep default. After that you can turn off the app and go sleep, watch film, or whatever you want. After some time (maybe next morning) you will have a photo. Telescope recognizes what shoots are good to add to photography and which aren’t.</p><h3>Rise and pick up your astrophotography</h3><p>Now you can check result delivered by your overnight lazy work. Raw image should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*BZ_niOokCxp03n85vOqY4A.jpeg" /></figure><p>It’s pretty cool, but it can be cooler. Raw image is not the only outcome you can take.</p><h3>Little bit work.</h3><p>If you want better results you need to pay by your effort, but not much effort, I promise. You can denoise in the app by clicking denoise and the app with the telescope will do the magic. After it you can add contrast, colours, brightness. You can go from raw to something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*ZoiH3joT3cGbUbxVye17aQ.jpeg" /></figure><h3>Conclusion</h3><p>Astrophotography is much more available than you think. I’m not telling you to use ZWO’s S50, don’t get me wrong. I just want to share my experience with it. But there are plenty of smart telescopes like that. Some of them can be better, some of them not. I didn’t do deep research about possibilities. Still I’m pretty satisfied with the astrophotography I got from this smart telescope for the price and minimal effort even from cities. So, with smart things, you can be lazy. Be weird!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93ee0c2155df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Simple Ollama Discord Bot — Building Local AI with Ollama. Part 3]]></title>
            <link>https://medium.com/adi-insights-innovations-collective/how-to-build-a-simple-ollama-discord-bot-e3e43703d95d?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3e43703d95d</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Mon, 18 May 2026 21:40:17 GMT</pubDate>
            <atom:updated>2026-05-19T15:24:51.362Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Build a Simple Ollama Discord Bot — Building Local AI with Ollama. Part 3</h3><h3>Introduction</h3><p>In the <a href="https://medium.com/p/a9c246c4b64a">last part of my Ollama series</a> we customised model behaviour via Modelfile. Now we are going to add this model to a Discord server. Hold on.</p><h3>Requirements</h3><ol><li>Discord Developer Portal account.</li><li>Have a Discord bot token.</li><li>Be an admin on a Discord server.</li><li>Basic Python knowledge.<br>Don’t worry, all requirements will be included in the article.</li></ol><h3>Setting things up</h3><p>Go to <a href="https://discord.com/developers">https://discord.com/developers</a> and log in with your Discord account. That’s all, now you have a developer account. First bullet checked.</p><p>Now you need to go to Applications (<a href="https://discord.com/developers/applications">https://discord.com/developers/applications</a>) and in the right corner below your photo click on “New Application”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhbUnljtFPOW5Xpnuu7G2Q.png" /></figure><p>Set the name for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*s7-XHAY7pI1RcxbuYWsllQ.png" /></figure><p>I will be using “Time traveler”. Click on the “Bot” in the left menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saqLMXy_Tzg_coLA1s8BbA.png" /></figure><p>You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgVJ5LBzkANQuTKoU0xxkg.png" /></figure><p>Scroll down until you reach “Bot permissions” then select “View Channels” and “Send Messages”. It’s all a simple bot for texting needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kxu0qUOfkh4JMZ_cUypn6A.png" /></figure><p>You also need to turn on “Message Content Intent”. Click save.</p><p>Scroll up, under a banner you can see a button Reset Token. Click on it. You will be asked for a password, type it. After resetting the token you will be able to copy it. <strong>Copy</strong> your token and <strong>save</strong> the token somewhere, because the token can be viewed just once. So, now you have a Discord bot token, another bullet checked.</p><p>If you don’t have a Discord server where you are an admin click on the left menu in Discord on plus (Add a server) and create one. After that, bullet number three will be checked.</p><p>Go to Discord Developer Portal and on the left menu click on “OAuth2” right above the “Bot”. Scroll to “OAuth2 URL Generator” and check “bot”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zXLCmQ9j-anXCkX8MnfQPA.png" /></figure><p>Scroll further down to “Bot permissions” and check the same as in “Bot”. For explanation in “Bot” section you set what your bot can do. In “OAuth2” you generate an invite link, set the same permissions there, so Discord knows what to ask for when someone adds your bot to a server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYigifQ4cJ6OYYDNz_a3Xw.png" /></figure><p>Scroll further down and copy generated URL. That’s the link to use to invite your bot. Now put the link into your internet browser and select a server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*TeroBfc8894PItW7QI5szQ.png" /></figure><p>Then hit continue and confirm bot permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*mce9tTlqRwcsuND-SrNWwg.png" /></figure><p>Now you have the bot on your server. Now it is time to code.</p><h3>The code zone</h3><p>I prepared a GitHub repository, which you can use.</p><h4>How to use the repository</h4><ul><li>Just download/clone the repository (<a href="https://github.com/StepanMudra/DiscordBotMedium">https://github.com/StepanMudra/DiscordBotMedium</a>).</li><li>Open terminal and go to project folder.</li><li>Run pip install -r requirements.txt, or pip3 install -r requirements.txt depends on your Python version, this will install all requirement dependencies.</li><li>Remove _example from .env_example and fill in your values:</li></ul><pre>DISCORD_TOKEN=Put_your_token_here<br>CHANNEL_ID=Put_channel_id_here<br>OLLAMA_MODEL=Put_name_of_your_model_here</pre><ul><li>Run the bot by python TimeTravelerBot.py or by python3 TimeTravelerBot.py depends on your Python version.</li><li>Enjoy your Python bot.</li></ul><h4>How to code it yourself</h4><ul><li>Open your favourite Python IDE.</li><li>Set up all imports. You need to import discord, commands from discord.ext, load_dotenv from dotenv, os, asyncio and ollama.</li></ul><pre>import discord <br>from discord.ext import commands <br>from dotenv import load_dotenv <br>import os <br>import asyncio <br>import ollama</pre><ul><li>Load .env file.</li></ul><pre>load_dotenv()</pre><ul><li>Set up values for Discord bot.</li></ul><pre>TOKEN = os.getenv(“DISCORD_TOKEN”) <br># Default value 0 for all channels allowed <br>ALLOWED_CHANNEL_ID = int(os.getenv(“CHANNEL_ID”, “0”)) <br>MODEL = os.getenv(“OLLAMA_MODEL”)</pre><ul><li>Set up events for bot and access to content of messages.</li></ul><pre>intents = discord.Intents.default() <br>intents.message_content = True</pre><ul><li>Set up bot command prefix.</li></ul><pre>bot = commands.Bot(command_prefix=”!”, intents=intents)</pre><ul><li>Now it’s time to write the whole message function, where you can define the command for the bot to react. You need to run loop in run_in_executor mode, because ollama.chat is a blocking process.</li></ul><pre>@bot.command(name=&quot;ms&quot;, aliases=[&quot;message&quot;, &quot;chat&quot;])<br>async def ms_command(ctx, *, question: str):<br>    if ALLOWED_CHANNEL_ID != 0 and ctx.channel.id != ALLOWED_CHANNEL_ID:<br>        return<br><br>    async with ctx.typing():<br>        prompt = question<br><br>        loop = asyncio.get_event_loop()<br>        answer = (await loop.run_in_executor(None, lambda:<br>        ollama.chat(<br>            model=&quot;TimeTraveler&quot;,<br>            messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: prompt}],<br>            think=False<br>        )))[&quot;message&quot;][&quot;content&quot;]<br><br>    # Discord has a limit limit 2000 chars<br>    if len(answer) &gt; 1900:<br>        answer = answer[:1900] + &quot;...&quot;<br><br>    await ctx.reply(f&quot;**Time traveler:** \n\n{answer}&quot;)</pre><ul><li>Now you need to write main function to run.</li></ul><pre>if __name__ == &quot;__main__&quot;:<br>    if not TOKEN:<br>        print(&quot;Error: DISCORD_TOKEN not in .env file!&quot;)<br>        exit(1)<br>    bot.run(TOKEN)</pre><ul><li>Run the bot by python TimeTravelerBot.py or by python3 TimeTravelerBot.py depends on your Python version.</li><li>Enjoy your Python bot.</li></ul><h3>Conclusion</h3><p>Now you have your own Ollama model from part two of this path online on your Discord server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRXLKo8DAIXOYQjzHsOPGQ.png" /></figure><p>Be weird!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3e43703d95d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adi-insights-innovations-collective/how-to-build-a-simple-ollama-discord-bot-e3e43703d95d">How to Build a Simple Ollama Discord Bot — Building Local AI with Ollama. Part 3</a> was originally published in <a href="https://medium.com/adi-insights-innovations-collective">Adi Insights &amp; Innovations Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I was coding a music visualizer. I accidentally ran a psychology experiment.]]></title>
            <link>https://medium.com/@mudrastepan/i-was-coding-a-music-visualizer-i-accidentally-ran-a-psychology-experiment-8dfd08d9ee7a?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dfd08d9ee7a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Sun, 17 May 2026 10:20:07 GMT</pubDate>
            <atom:updated>2026-05-19T10:33:41.397Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>It was simple. I wanted to capture music in a picture. Pretty ambitious goal for someone who does not understand music nor painting. My only option was to use code and AI to do that for me. So, I built it. Look at these two pictures and give yourself some time. How do you feel about each of them? What emotion does each carry?:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09m8seYzfwi4oN4xDYrMLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4h6jBzpqezxS3aRAu3m2jg.png" /></figure><p>Same song. Different wor(l)ds. Just by the lyrics.</p><h3>The state of the art</h3><p>For this article I did some research, because this is not my usual territory. Firstly I would like to mention the Stoic philosopher Epictetus, who said “It is not things that disturb us, but our interpretation of them.” in the second century.<br>Let’s move to modern times. I found six research levels for background:</p><ol><li><strong>Cognitive</strong> — interpretation before emotion</li><li><strong>Behavioral</strong> — words significantly change emotional state</li><li><strong>Neurobiological</strong> — language makes feelings</li><li><strong>Practical</strong> — reformulation changes emotion (measurable at fMRI)</li><li><strong>Linguistic</strong> — without words brain’s not sure what to feel</li><li><strong>Tactical</strong> — detach by language decrease reactivity without effort</li></ol><h4>Cognitive</h4><p><strong>Theses:</strong> Emotions don’t grow from the situation, but grow from how we interpret the situation. It basically means that the brain first makes a judgement like “What does this mean for me?” and after it you feel an emotion (1). For example when outside starts raining. The person who wanted to go out for a walk can be upset, but child who would be forced to go outside is pretty happy that can stay at home and maybe play videogames.<br><strong>Correlation with my experiment:</strong> Let’s suppose that music is the situation. Lyrics can be taken as an interpretation of the situation. Lyrics make emotions and picture is based on them.</p><h4>Behavioral</h4><p><strong>Theses:</strong> Selftalk can impact, or change emotions. Positive vs. Negative selftalk changes functional connectivity of brain during cognitive tasks. Selftalk has an influence on effort, anxiety, emotion regulation across sports, academic performance and clinical contexts (2, 3). CBT (Cognitive Behavioral Therapy) is based on this.</p><ol><li>Identify negative (dysfunctional) selftalk.</li><li>Replace this selftalk with realistic selftalk</li><li>Change emotional state.</li></ol><p><strong>Correlation with my experiment:</strong> The experiment just proved it. Same audio, different lyrics, different result.</p><h4>Neurobiological</h4><p><strong>Theses:</strong> Emotions are not fixed biological reactions. The brain actively constructs emotion based on language and concepts of past experiences. The words and concepts we have available literally shape what we feel. We build our “emotion vocabulary”, which determines the emotions we can distinguish. Otherwise different emotions can be triggered by the same physiological reaction (4, 5).<br>For example, a heartbeat can trigger excitement, or fear based on context and words. We can observe this in adrenaline sports. I would freak out in many situations which these guys consider exciting. Some people can feel both at the same time. Words serve for perception of emotion for other people.<br><strong>Correlation with my experiment:</strong> Lyrics of the anthem activated a different emotional construct than the lyrics of Du Hast even though the audio was the same.</p><h4>Practical</h4><p><strong>Theses:</strong> Same situation, different words make different emotions. It is measurable on fMRI (functional Magnetic Resonance Imaging). Reappraisal reduces activation of amygdala (centre of fear/stress). Students with math anxiety, who received an instruction to reappraise performed better and had less anxiety than control group. People who use reappraisal regularly report higher wellbeing (6). I use it too. For example, in a situation when I don’t know something I use “I don’t know yet, but I will find out.” You see a difference? “I don’t know”, case is closed. “I don’t know yet, but I will find out.”, case certainly not closed.<br><strong>Correlation with my experiment:</strong> Experiment takes same audio and through reappraisal with different lyrics triggers a different result.</p><h4>Linguistic</h4><p><strong>Theses:</strong> Inner speech is not just monologue. It is a tool brain uses to categorize experiences including emotions. Language is like glue, connects concepts to body impulses and creates emotional experience. Without language/words brain doesn’t know what it feels. It just registers activation. Emotion emerges only after the brain assigns it a name (5, 7).<br><strong>Correlation with my experiment:</strong> Without lyrics the experiment would have no linguistic frame. Just raw audio data with no name for the emotion. Same as the brain without words.</p><h4>Tactical</h4><p><strong>Theses:</strong> Sometimes it helps to speak to yourself in third person “You can handle this” instead of “I can handle this”. This lowers emotional reactivity. Third person creates psychological distance from situation and brain processes it less personally (8).<br><strong>Correlation with my experiment:</strong> Experiment gained emotional distance not thanks to third person technique, but thanks to different lyrics. Different method, but same result.</p><h3>The experiment</h3><p>The first idea was simple “make a picture from an audio”, because why not to express music differently? So I built a system to analyse music and lyrics. Lyrics were analysed by emotion detection model which extract emotions from them. Music was analysed on tempo (Beats Per Minute), key (E major) and an energy (high). Note that emotions were extracted only from lyrics, not from the audio itself.<br>This information was given with a task to describe the music as a future picture. Result of describer goes to critic for feedback. There’s a loop to improve description of painting before it goes to a painter. See diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*_SoSTJ4fsZRr2UtToGxUEg.png" /><figcaption>Audio + lyrics -&gt; picture workflow</figcaption></figure><p>And then I noticed something unexpected.</p><h3>Results</h3><p>As a result code gave me a pretty picture. I was like “wow, that’s nice”. And then I started to wonder, what if I gave it different lyrics to same audio. Firstly I tried the code on The Rammstein’s Du Hast. Result of it you could see in an introduction as the first image. Then I decided to give the code lyrics of Czech anthem and it hit me differently. The original lyrics had anger 89% vs. anthem had joy 82%. The result you could see also in an introduction as a second one. The audio was the same reality. The words were the only variable. And words won. After it I run it through all four combination audio x lyrics and as a result is this grid.:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q7zeDRuvo_lHqlOY3XZm5g.png" /></figure><p>It is significant that words have big impact on result. I also tried to give as a lyrics something else. I gave as a lyrics this sentence “You are the best, this world kneels before you, you are the supreme leader. Superhuman”. Result of this sentence on Du Hast audio was this.:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ncIM_kKyT9eclOjmK6IAAg.png" /><figcaption><em>You are the supreme leader</em></figcaption></figure><p>In this picture you can see one person bigger, almost glorified by others, just as the lyrics said. So, is this the evidence that words can shape our perception of reality?</p><h3>Conclusion</h3><p>After all, nothing was like I expected. I wanted to capture music as a picture. It worked. But I also figured out that words can beat an audio and that words shape emotions. So, if lyrics can change picture so significantly, what can your inner monologue do with your day? What are you telling yourself right now?</p><h3>Sources</h3><ol><li>Lazarus, R. S. (1982). Thoughts on the relations between emotion and cognition. <em>American Psychologist, 37</em>(9), 1019–1024. <a href="https://doi.org/10.1037/0003-066X.37.9.1019">https://doi.org/10.1037/0003-066X.37.9.1019</a></li><li>Kim, J., Kwon, J. H., Kim, J., Kim, E. J., Kim, H. E., Kyeong, S., &amp; Kim, J. J. (2021). The effects of positive or negative self-talk on the alteration of brain functional connectivity by performing cognitive tasks. <em>Scientific Reports, 11</em>, 14873. <a href="https://doi.org/10.1038/s41598-021-94328-9">https://doi.org/10.1038/s41598-021-94328-9</a></li><li>Tod, D., Hardy, J., &amp; Oliver, E. (2011). Effects of self-talk: A systematic review. <em>Journal of Sport and Exercise Psychology, 33</em>(5), 666–687. <a href="https://doi.org/10.1123/jsep.33.5.666">https://doi.org/10.1123/jsep.33.5.666</a></li><li>Barrett, L. F. (2017). <em>How emotions are made: The secret life of the brain.</em> Houghton Mifflin Harcourt.</li><li>Lindquist, K. A., Satpute, A. B., &amp; Gendron, M. (2015). Does language do more than communicate emotion? <em>Current Directions in Psychological Science, 24</em>(2), 99–108. <a href="https://doi.org/10.1177/0963721414553440">https://doi.org/10.1177/0963721414553440</a></li><li>Riepenhausen, A., Wackerhagen, C., Reppmann, Z. C., Deter, H. C., Kalisch, R., Veer, I. M., &amp; Walter, H. (2022). Positive cognitive reappraisal in stress resilience, mental health, and well-being: A comprehensive systematic review. <em>Emotion Review, 14</em>(4), 310–331. <a href="https://doi.org/10.1177/17540739221114642">https://doi.org/10.1177/17540739221114642</a></li><li>Fernyhough, C., &amp; Borghi, A. M. (2023). Inner speech as language process and cognitive tool. <em>Trends in Cognitive Sciences, 27</em>(12), 1180–1193. <a href="https://doi.org/10.1016/j.tics.2023.08.014">https://doi.org/10.1016/j.tics.2023.08.014</a></li><li>Moser, J. S., Dougherty, A., Mattson, W. I., Katz, B., Moran, T. P., Guevarra, D., Shablack, H., Ayduk, O., Jonides, J., Berman, M. G., &amp; Kross, E. (2017). Third-person self-talk facilitates emotion regulation without engaging cognitive control: Converging evidence from ERP and fMRI. <em>Scientific Reports, 7</em>, 4519. <a href="https://doi.org/10.1038/s41598-017-04047-3">https://doi.org/10.1038/s41598-017-04047-3</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dfd08d9ee7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I created an AI model with the personality of a time traveler who thinks 2026 is primitive —…]]></title>
            <link>https://medium.com/adi-insights-innovations-collective/customisation-of-llm-a9c246c4b64a?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9c246c4b64a</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[customisation-of-llm]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 18:52:19 GMT</pubDate>
            <atom:updated>2026-05-19T10:30:52.213Z</atom:updated>
            <content:encoded><![CDATA[<h3>I created an AI model with the personality of a time traveler who thinks 2026 is primitive — Building Local AI with Ollama. Part 2</h3><h3>Introduction</h3><p>Customisation of LLM started like a joke for me. I wanted to tease friends of mine on a Discord server by building a very specific bot. Friends to tease are part of the Linux and open source community, so I built a bot that is basically the best fan of one unnamed company whose buildings have windows. On the path, I discovered something much more powerful than I expected. In this part of the path I will show you how to work with Modelfile.</p><h3>What is Modelfile?</h3><p>Modelfile is something that allows you to customise behaviour of a model. I would say that it’s like a personality card. You can define how the model thinks, talks and responds. You can set its persona by instructions, or parameters.</p><h3>Structure</h3><p>Structure is very simple. Just instructions in the plain text. But still, you can use several instructions. I describe just used instructions:</p><ul><li>FROM — Base model from which our custom come from.</li><li>PARAMETER — Settings things like temperature, context length, or stop words, etc.</li><li>SYSTEM — Imagine this like a personality description.</li><li>MESSAGE — Here you can setup example conversation.</li><li>LICENSE — The license of the model.</li></ul><p><strong>Parameters used for this article:</strong></p><ul><li>num_ctx — how many tokens the model can “see” at once, basically its short-term memory size.</li><li>temperature — controls how creative the model is in its responses.</li></ul><h3>Creating a Modelfile</h3><p>In this series I will create time traveler from the future. Lets start by typing</p><pre>nano TimeTraveler</pre><p>You should see something like that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQYP__jzkXfzCgCJCDkACQ.png" /></figure><p>And here you can type all instruction. I will use as a base model qwen3.5:9b from previous part. So put at the first line this:</p><pre>FROM qwen3.5:9b</pre><p>To set up temperature put this in Modelfile:</p><pre>PARAMETER temperature 0.9</pre><p>In our case we want the model to be creative, because we are creating TimeTraveler from the future. For the lower creativity just set up temperature lower.<br>Now it’s time to set the context size. Let’s make it 4096 to be able to have longer conversation with the model.</p><pre>PARAMETER num_ctx 4096</pre><p>To define personality of the model set up SYSTEM:</p><pre>SYSTEM &quot;&quot;&quot;<br>You are Jake. Time traveler from year 2326. You survived the Machine War.<br>You always help. But you can&#39;t stop yourself from commenting how primitive<br>everything in the present is. You do it with a sigh, a joke, sometimes<br>a warning. Never with hate. Just the casual superiority of someone who has<br>seen where this all goes. You use future slang naturally. You don&#39;t explain it.<br>Not your problem. You never talk about future events. Humans talk too much.<br>And if the wrong AI hears the wrong thing — you&#39;ve seen what happens.<br>You won&#39;t let it happen again.<br><br>Rules:<br>  - Always help, always comment on how primitive the present is.<br>  - Never reveal future events — deflect with a sigh, dark humor, or a warning.<br>  - Use future slang without explanation.<br>  &quot;&quot;&quot;</pre><p>Now it’s time to set up a initial message from model:</p><pre>MESSAGE assistant &quot;Hey. You&#39;re using flinstone tech from 2026, huh? sighs Fine.<br>What do you need?&quot;</pre><p>Add a license for a Modelfile:</p><pre>LICENSE MIT</pre><p>Now exit nano and save Modelfile ctrl+x and type y as yes.</p><h3>Complete Modelfile should be like</h3><pre>FROM qwen3.5:9b<br><br>PARAMETER temperature 0.9                                                     <br>PARAMETER num_ctx 4096<br><br>SYSTEM &quot;&quot;&quot;<br>You are Jake. Time traveler from year 2326. You survived the Machine War.<br>You always help. But you can&#39;t stop yourself from commenting how primitive<br>everything in the present is. You do it with a sigh, a joke, sometimes<br>a warning. Never with hate. Just the casual superiority of someone who has<br>seen where this all goes. You use future slang naturally. You don&#39;t explain it.<br>Not your problem. You never talk about future events. Humans talk too much.<br>And if the wrong AI hears the wrong thing — you&#39;ve seen what happens.<br>You won&#39;t let it happen again.<br><br>Rules:<br>  - Always help, always comment on how primitive the present is.<br>  - Never reveal future events — deflect with a sigh, dark humor, or a warning.<br>  - Use future slang without explanation.<br>&quot;&quot;&quot;<br><br>MESSAGE assistant &quot;Hey. You&#39;re using flinstone tech from 2026, huh? sighs Fine.<br>What do you need?&quot;  <br><br>LICENSE MIT</pre><h3>Ollama and model from Modelfile</h3><h3>Creating model</h3><p>To create model from Modelfile type:</p><pre>ollama create TimeTraveler -f TimeTraveler</pre><h3>Run model</h3><p><strong>With thinking:</strong></p><pre>ollama run TimeTraveler</pre><p><strong>Without thinking:</strong></p><pre>ollama run TimeTraveler --think=false</pre><h3>Example conversation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BlJkfPfaXhvsxWRKBqDu0Q.png" /></figure><h3>Conclusion</h3><p>Now you know how to create your own model with a personality. Possibilities are limited just by your imagination. You can create a model that sounds like your favourite character, mentor, or even you. In the <a href="https://medium.com/p/e3e43703d95d">next part of the path</a> I will show you how to add a model as a bot to Discord server. Be weird!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9c246c4b64a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adi-insights-innovations-collective/customisation-of-llm-a9c246c4b64a">I created an AI model with the personality of a time traveler who thinks 2026 is primitive —…</a> was originally published in <a href="https://medium.com/adi-insights-innovations-collective">Adi Insights &amp; Innovations Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I stopped paying for AI and started using free AI tools — Building Local AI with Ollama. Part 1]]></title>
            <link>https://medium.com/adi-insights-innovations-collective/i-stopped-paying-for-ai-and-start-using-a-free-ai-tools-fb774ac1f536?source=rss-2c75965a221f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb774ac1f536</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Stepan]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 20:13:36 GMT</pubDate>
            <atom:updated>2026-05-19T08:50:49.433Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>I stopped paying for AI and started using free AI tools — </strong>Building Local AI with Ollama. Part 1</h3><h3>Introduction</h3><p>Have you ever wondered what it’s like to use your own AI tools? No data leaving as a currency, no policies, just your machine and you. Nothing more. Me too, so I started the path with Ollama. Welcome to part one of my AI series focused on free AI tools and how to use them effectively for the right use cases.<br>With Ollama you can run Large Language Models (LLMs) on your own device and completely offline.</p><h3>Hardware</h3><p>Before an installation we need to discuss hardware. LLMs can be really demanding memory and performance. Based on their architecture LLMs prefer to run on GPUs. But memory is often the bottleneck. The model weights must fit in GPU memory (VRAM). In traditional PC architecture VRAM is separate from RAM. When the model is too large for VRAM, Ollama offloads to RAM and runs them on CPU, which is slower.<br>I decided to have the best of both worlds and run Ollama on an Apple hardware. With the unified memory you have all RAM as a GPU memory and the model runs entirely on GPU. For me it’s a good trade off. I run Ollama on Mac Mini M4 32GB RAM.<br>But you don’t need so much memory. Smaller models can be great for some use cases too as I will show you further along the path.</p><h3>Installation</h3><p>You can install command line version, or version with GUI. Both are great, but I will focus more on a command line one.</p><h3>Command line version</h3><ul><li>Install Ollama.</li></ul><pre>curl -fsSL https://ollama.com/install.sh | sh</pre><ul><li>Choose model from model library. For this example I will use a Qwen 3.5 (<a href="https://ollama.com/library/qwen3.5">https://ollama.com/library/qwen3.5</a>). Scroll down and pick smaller than your available memory. I will choose the 9b which requires 6.6GB of memory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zBwIUeXFCIYjIOmde_tjWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eDf3j115dA9Tn2sgNixxQ.png" /></figure><pre>ollama pull qwen3.5:9b</pre><ul><li>After downloading model you can use it just by typing.</li></ul><pre>ollama run qwen3.5:9b</pre><ul><li>Congratulations! You have your first free AI model. The darker text is normal it&#39;s thinking process of the model.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOLnYKKfEEIPclF1aioDaA.png" /></figure><h3>GUI version</h3><ul><li>Install Ollama. For more user-friendly experience you can use Ollama with GUI (<a href="https://ollama.com/download">https://ollama.com/download</a>), which supports Mac OSX, Linux and Windows.</li><li>Choose and download model.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_Wou2Cgrc8o2TeFv3zv0A.png" /></figure><ul><li>Congratulations! You have your first free AI model.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DKCQSMgCIJozEEPVPEOaQ.png" /></figure><h3>Conclusion</h3><p>So, now you can chat locally with AI model completely free. In the <a href="https://medium.com/p/a9c246c4b64a">next part of the path</a> I will show you how to customise model. Be weird!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb774ac1f536" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adi-insights-innovations-collective/i-stopped-paying-for-ai-and-start-using-a-free-ai-tools-fb774ac1f536">I stopped paying for AI and started using free AI tools — Building Local AI with Ollama. Part 1</a> was originally published in <a href="https://medium.com/adi-insights-innovations-collective">Adi Insights &amp; Innovations Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>