<?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 Santosh Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Santosh Shrestha on Medium]]></description>
        <link>https://medium.com/@santoshshrestha.sh?source=rss-47c4c93e96cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MUUtaW4PorCUSLPv</url>
            <title>Stories by Santosh Shrestha on Medium</title>
            <link>https://medium.com/@santoshshrestha.sh?source=rss-47c4c93e96cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 06:58:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@santoshshrestha.sh/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[YoungInnovations Weekly #473: Trip to Sailung, Meet Our New Intern, A Warm Get-Well Soon Message…]]></title>
            <link>https://medium.com/younginnovations-blog/younginnovations-weekly-473-trip-to-sailung-meet-our-new-intern-a-warm-get-well-soon-message-f28f1008ab3d?source=rss-47c4c93e96cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/f28f1008ab3d</guid>
            <dc:creator><![CDATA[Santosh Shrestha]]></dc:creator>
            <pubDate>Fri, 14 Nov 2025 11:45:00 GMT</pubDate>
            <atom:updated>2025-11-14T11:45:00.121Z</atom:updated>
            <content:encoded><![CDATA[<h3>YoungInnovations Weekly #473: Trip to Sailung, Meet Our New Intern, A Warm Get-Well Soon Message for Ankur and Sanjay</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5iKra5x_JO3CrpR9skwqrA.png" /></figure><blockquote><em>“Every new beginning comes from some other beginning’s end.”</em> — Seneca</blockquote><h3>Trip to Sailung</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UrEqjbUq_nmvns02zHM9Ng.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*So-B7SY4AzJPdEmBJAtrng.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CkRndhlITE_jHTQQAy8bFg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGKhTCw3KvhSscYeb4nmMA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cvKCJRtPlsynX99pKaJkug.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEpH1WH8WqsQH2khO24EgA.jpeg" /><figcaption>A Memorable Trip to Sailung</figcaption></figure><p>After a solid year of planning, postponing, and generally failing to coordinate eight busy schedules (it’s harder than herding cats, trust us), the group finally made it happen last weekend!</p><p>While they revved up their engines for a memorable bike ride to the “heavenly paradise,” I sadly couldn’t join them for the trip to Sailung, a scenic, high-altitude hill station in eastern Nepal.</p><p><a href="https://www.google.com/viewer/place?mid=/g/11px2bk_r5&amp;sa=X&amp;ved=2ahUKEwjj15j4pPGQAxWIS2cHHQifGAwQqdYPegQIAhAC">Sailung</a> (or Shailung) is a scenic, high-altitude <strong>hill station and rural municipality in eastern Nepal</strong>, known as the <strong>“land of a hundred hills”</strong> (from the local words “sai” meaning hundred and “lung” meaning hills). It is situated at an elevation of approximately 3,146 meters (10,322 feet) on the border of the Dolakha and Ramechhap districts, about 130 km east of Kathmandu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGhOWfKTmHQhFF2YG4qC6A.jpeg" /><figcaption><strong>Sujit Nepal</strong></figcaption></figure><blockquote>Last week, a few of us colleagues went on a bike trip to Sailung. We were a group of eight, and it was a memorable adventure. Sailung lies on the border of Dolakha and Ramechhap districts, with most of the area falling within Dolakha. One of the highlights of our trip was the early-morning ride, enjoying the scenic views of Nagarkot under the cold, refreshing weather. The ride overall was smooth, with good road conditions throughout, except for the last 10 km leading up to Sailung. Since we visited during peak autumn, we were fortunate to get a perfectly clear view of the mountain ranges, including Mt. Gaurishankar, Langtang, and Annapurna II. The landscape of Sailung itself is mesmerizing, with its beautiful rolling hillocks spread across high altitudes, creating a breathtaking and peaceful environment — <a href="https://medium.com/u/d81ab1c50b3b">sujit</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*beZk4Pqboocqm4TtzDKfOg.jpeg" /><figcaption><strong>Aashish Bhandari</strong></figcaption></figure><blockquote>Our recent weekend office trip to Sailung was a truly refreshing and memorable experience, planned as a break from our busy day-to-day work life. The journey itself felt incredible as we drove through winding roads surrounded by scenic mountain views that instantly lifted our spirits. The peaceful environment, cool breeze, and natural beauty made the entire getaway fulfilling, giving us the perfect opportunity to relax, bond as a team, and return rejuvenated with lasting memories — <a href="https://medium.com/u/3b17df9dc95b">Aashish Bhandari</a>.</blockquote><h3>Meet Our New Intern</h3><figure><img alt="Aaditya Joshi" src="https://cdn-images-1.medium.com/max/956/1*OGmsDK7r9VqsSfwihwqNPg.jpeg" /><figcaption><strong>Aaditya Joshi</strong></figcaption></figure><blockquote>Hi, I am Aaditya Joshi. I am a passionate and driven Computer Engineering student. I like playing all types of sports and occasionally watch football during my off time. I am very eager to work in a company like Young Innovations to improve my skills. I like learning fast, working with good people, and taking on challenges that actually feel worth solving. — <strong>Aaditya Joshi</strong></blockquote><h3><strong>A Warm Get-Well Soon Message for Ankur and Sanjay</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5mfiWsGOCrrlR5MMXab9w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8TZcuZfnbgmw7_B8bSx-sg.jpeg" /><figcaption>Ankur and Sanjay — Get Well Soon</figcaption></figure><p>At work, we often get caught up in tasks and timelines, but moments like this remind us how important the people around us are. Our DevOps teammate Ankur and our close friend Sanjay are both taking some time to recover, and the whole team is thinking of them.</p><blockquote>Get well soon Ankur dai! Take care and recover fast — Admin Ghale</blockquote><blockquote>Hello, Ankur dai!. Get Well Soon — Dhiran</blockquote><blockquote>Hello, Ankur!!!. Get Well Soon. Have a speedy recovery. — Bhandari Dada</blockquote><blockquote>Hello Ankur. Please get better soon. The CI/CD pipeline is lonely and refuses to pass without your moral support. — Suyog Raj</blockquote><blockquote>Get Well Soon Ankur dai. Looking forward to see you in office with a big smile. — Pradeep</blockquote><blockquote>Get Well Soon Ankur dai, See you soon at CG. We are missing connector in chief. — Samresh</blockquote><blockquote>I can’t wait to see your energetic self. Get well soon, my friend. — Prasanna</blockquote><blockquote>Hey Ankur Dai,</blockquote><blockquote>I just wanted to take a moment to wish you a speedy recovery. I hope you’re able to take the time you need to rest and let your elbow heal properly. Everyone is thinking of you and sending positive thoughts your way. Wishing you good health, strength, and a smooth recovery. Looking forward to seeing you back soon, feeling better and full of energy.</blockquote><blockquote>Take care,</blockquote><blockquote>Karna — Your beloved intern</blockquote><h3>Wrapping Up My Time at YIPL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y1Wuim02yNhPAR0uHK2a0Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1THitvTtw5oUKfF6A9Lrw.jpeg" /></figure><blockquote>Today is my last day at YoungInnovations, and it still feels a bit unreal. I’ve learned a lot, worked with some great people, and collected enough stories to last a while. I’m leaving with a full heart, a few inside jokes, and hopefully no unfinished bugs — <a href="https://medium.com/u/47c4c93e96cd">Santosh Shrestha</a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f28f1008ab3d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/younginnovations-blog/younginnovations-weekly-473-trip-to-sailung-meet-our-new-intern-a-warm-get-well-soon-message-f28f1008ab3d">YoungInnovations Weekly #473: Trip to Sailung, Meet Our New Intern, A Warm Get-Well Soon Message…</a> was originally published in <a href="https://medium.com/younginnovations-blog">YoungInnovations&#39; Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Semantic Search with PostgreSQL and pgvector in Node.js: A Practical Guide]]></title>
            <link>https://medium.com/@santoshshrestha.sh/implementing-semantic-search-with-postgresql-and-pgvector-in-node-js-a-practical-guide-e0379f1c11fa?source=rss-47c4c93e96cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0379f1c11fa</guid>
            <dc:creator><![CDATA[Santosh Shrestha]]></dc:creator>
            <pubDate>Wed, 28 May 2025 06:38:57 GMT</pubDate>
            <atom:updated>2025-05-28T07:47:16.323Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In this article, we’ll explore how to implement semantic search functionality using <strong>PostgreSQL’s pgvector extension</strong> with <strong>Node.js</strong>. We’ll build a simple blog system that can perform <strong>semantic search</strong> on blog content, making it easier for users to find relevant articles based on <strong>meaning</strong> rather than just keywords.</p><h3>What is Semantic Search ?</h3><p>Semantic search is a smarter way for computers to find information. Instead of just looking for exact words, it tries to understand what you <em>mean</em>. For example, if you search for “how to cook pasta,” a regular search might only look for pages with those exact words. But a <strong>semantic search</strong> understands that you’re looking for <em>pasta recipes</em> or <em>steps to prepare pasta</em>, even if those exact words aren’t used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzgdEc47xiU4Xqo4sE7Uqw.png" /></figure><p>Think of it like asking a friend a question. If you say, “I’m hungry for something Italian,” your friend might suggest pizza or pasta — not just repeat the word “Italian.” That’s what semantic search does — it understands the idea behind your words, not just the words themselves.</p><p>This kind of search is especially helpful when people use different words to describe the same thing. It makes search results more accurate and useful, no matter how the question is asked.</p><h3>Project Overview</h3><p>Our implementation uses the following technologies:</p><ul><li><strong>Node.js</strong> with Express for the backend</li><li><strong>PostgreSQL</strong> with the <strong>pgvector</strong> extension for vector storage and similarity search</li><li><strong>Hugging Face’s API</strong> for generating text embeddings</li><li><strong>Sequelize</strong> as our ORM</li></ul><h3>Setting Up the Project</h3><p>Start by initializing your Node.js project and installing dependencies:</p><pre>yarn init -y<br>yarn install express sequelize pg pg-hstore axios dotenv</pre><p>After installing all the dependencies, go to the package.json file and add the following lines:</p><pre>&quot;type&quot;: &quot;module&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;dev&quot;: &quot;nodemon server.js&quot;,<br>  },</pre><p>By setting the type to <strong>“module”</strong>, we can use ES6 syntax instead of CommonJS. The start script will also automatically reload the app whenever we make changes, so we don’t need to manually restart the server. Finally, we’ll create a .env file to store our database connection details securely.</p><p>To start the application, run npm run dev in the terminal.a</p><h3>Database Configuration</h3><h4>Install pgvector on postgress</h4><pre>sudo apt install postgresql-16-pgvector</pre><p>After installation is completed login to PostgreSQL.</p><pre>psql -U db-username db-name</pre><p>Enable pgvector</p><pre>CREATE EXTENSION IF NOT EXISTS vector;</pre><p>Now our database is ready to create embeddings.</p><h3>Initalizing Sequelize</h3><p>Create a file called database.js inside the config folder. This file will handle setting up and connecting our database using Sequelize.</p><pre>import { Sequelize } from &#39;sequelize&#39;;<br>import dotenv from &#39;dotenv&#39;;<br><br>const sequelize = new Sequelize({<br>  dialect: &#39;postgres&#39;,<br>  host: process.env.DB_HOST,<br>  username: process.env.DB_USER,<br>  password: process.env.DB_PASSWORD,<br>  database: process.env.DB_NAME,<br>  port: process.env.DB_PORT || 5432,<br>  logging: false, // Set to console.log to see SQL queries<br>  pool: {<br>    max: 5,<br>    min: 0,<br>    acquire: 30000,<br>    idle: 10000<br>  }<br>});<br><br>// Initialize database connection<br>const initializeDatabase = async () =&gt; {<br>  try {<br>    await sequelize.authenticate();<br>    console.log(&#39;Successfully connected to PostgreSQL database&#39;);<br>    <br>    // Sync all models with database<br>    await sequelize.sync({ alter: false });<br>    console.log(&#39;Database synchronized successfully&#39;);<br>  } catch (error) {<br>    console.error(&#39;Error connecting to the database:&#39;, error.message);<br>    process.exit(1);<br>  }<br>};<br><br>export {sequelize, initializeDatabase };<br></pre><h3>Implementation Details</h3><h3>1. Vector Embeddings Helper</h3><p>Use Hugging Face’s API to generate embeddings for your blog content:</p><pre>import axios from &quot;axios&quot;;<br>import huggingface from &quot;../config/huggingface.js&quot;;<br><br>export default async function getVectorEmbeddings (context) {<br>        const hfToken = huggingface.HF_TOKEN;<br>        const endPointUrl = huggingface.HF_ENDPOINT_URL;<br><br>        const requestData = {<br>            &quot;inputs&quot; : context<br>        };<br><br>        const vectorEmbeddings = await axios.post(endPointUrl, requestData, {<br>            headers: {<br>                Authorization: `Bearer ${hfToken}`,<br>                &quot;Content-Type&quot;:&quot; application/json&quot;<br>            }<br>        });<br>        <br>        return vectorEmbeddings;<br>}</pre><blockquote><em>This Hugging Face inference URL — </em><em>https://router.huggingface.co/hf-inference/models/intfloat/multilingual-e5-large-instruct/pipeline/feature-extraction — generates a vector embedding with 1024 dimensions. In comparison, OpenAI’s embedding models produce vectors of different sizes depending on the model used: for example, </em><em>text-embedding-ada-002 returns embeddings with 1536 dimensions, while </em><em>text-embedding-3-large returns vectors with 3072 dimensions.</em></blockquote><blockquote><em>When storing embeddings in a database or using them for similarity search, it’s important to define the embedding column vector size based on the specific model you’re using, since different models output vectors of different lengths.</em></blockquote><h3>2. Blog Controller</h3><p>The BlogController handles three main operations:</p><ul><li><strong>Index</strong>: List all blogs</li><li><strong>Store</strong>: Create a new blog with vector embeddings</li><li><strong>Search</strong>: Perform semantic search on blog content</li></ul><h4>Store the blog contents</h4><p>In this example we’ll generate a vector using vectorEmbedding.js, then store it in the database using the sequelize.</p><pre>export const store = async (req, res) =&gt; {<br>    try {<br>        let data = {<br>            title: req.body.title,<br>            content: req.body.content,<br>            author: req.body.author,<br>            status: req.body.status,<br>            publishedAt: now(),<br>        };<br><br><br>        const vector = await getVectorEmbeddings(data.content);<br><br>        data = {...data, embedding : JSON.stringify(vector.data)};<br><br><br>        const newBlog = await Blog.create(data)<br>    <br>        return res.json({<br>            status : true,<br>            message: &quot;Success&quot;,<br>            data    : newBlog<br><br>        });<br>    }catch (err) {<br>        return res.status(500).json({<br>            status: false,<br>            message: &quot;Something went wrong!!!&quot;<br>        });<br>    }<br><br>}</pre><h4>Searching the content</h4><p>First the search paramaters is converted to vector using vectorEmbedding.js and the use the sequelize to query the database using the vector.</p><pre>export const search = async (req, res) =&gt; {<br>    const searchRequest = req.query.query;<br><br>    const getVector =  await getVectorEmbeddings(searchRequest);<br><br>    const getResult = await sequelize.query(<br>        `SELECT id,title,content,author,status, <br>         (embedding &lt;=&gt; $1) as similarity <br>         FROM blogs<br>         ORDER BY similarity ASC <br>         LIMIT 10`,<br>    {<br>        bind: [JSON.stringify(getVector.data)],<br>        type: sequelize.QueryTypes.SELECT<br>    }<br>    );<br>        <br>    return res.json({<br>        data: getResult.filter( (data,index)=&gt; {<br>            return data.similarity &lt;= 0.5<br>        })<br>    });<br>}</pre><h3>3. API Routes</h3><p>Set up your Express routes:</p><pre>import { Router } from &quot;express&quot;;<br>import { importFromFile, index, search, store } from &quot;../Controllers/BlogController.js&quot;;</pre><pre>const router = Router();</pre><pre>router.get(&#39;/&#39;, index);<br>router.post(&#39;/create&#39;, store);<br>router.get(&#39;/search&#39;, search);<br></pre><pre>export default router;</pre><h3>Using the API</h3><h3>Creating a Blog Post</h3><pre>POST /blogs/create<br>Content-Type: application/json</pre><pre>{<br>    &quot;title&quot;: &quot;Read system establish policy member.&quot;,<br>    &quot;content&quot;: &quot;Popular rule shake oil range prove. Future involve cut remain concern finish growth. Strategy offer about democratic. Form station technology financial. Make society like set place wrong. Wait organization heavy hundred. Chair middle use. Act language end back until friend commercial. Ball claim turn expert plan care know later. Spring that civil including. Itself million change investment. Necessary sell its wear yourself apply. All remain argue mother too among action ok. Court pick night form pretty sure serve. We set suddenly but Mr realize though national. Allow standard quickly program piece. Positive life fast technology. Laugh when both can name rock commercial interesting. Although look phone summer. Various between ready side note marriage coach. Try last final style nation only. Whom part along magazine. Government detail character culture put. In protect nation great. Budget none industry treat mouth. Century probably fill remain view maybe above part. Then office sometimes one will exist some. You tonight draw. Rock day ability site represent. Plan range ago town five. Before method lot. Price nice staff allow area ball fight guess. Western put service either year dog result. Consider cold argue. Design people instead one language life. Pass image society who. Today get involve whose lawyer. Director notice draw reality. Reach billion local experience. Accept resource four. Conference guy alone art Republican. Strong entire else cell mission simply. Throughout must choose middle throughout effect just. Training risk source man. Purpose summer kind push. Artist point rather ahead everybody. Director TV fact Mr. Draw though part hope pick. His sell focus store necessary. Mind claim paper have draw turn. Trouble general season run. Yourself a doctor push success especially table. Check fall determine whatever candidate nothing across. Finally ok mouth attorney official dark. Four popular believe whom. Campaign expert offer generation. Market share leg region. Who participant development product baby view team. Only carry general number system reality beyond no. But visit may decide clear. Worker important kitchen structure others stay human. Rate figure special school story. Show sign staff of. Detail assume blue security area. Plant none thought necessary mission. Ready letter thus summer tell six. Specific way prepare cut. Close none over according always vote it. Individual kid look respond. He table traditional call baby food simply. Special dark a cultural high. Mention while always civil trade evidence only. Despite standard memory meeting. Store production reduce drug hundred. Back bad fact. These special idea itself environmental people some. Actually store avoid seven. House form lose space every wide wear hit. Control law third wall campaign. Sure TV follow. Drug save pick may happen. Will cut chair ask spend adult. Road far doctor base brother. Until shake even night democratic. Upon while individual member black data any. Answer fear plan maintain break. Pay a since view. Computer nor lay control. Require own fill side. Approach scene to end report this coach. Different little great view we attack. Forward former trouble day hold. Nothing culture laugh apply leader effect. Or travel either account go trade wall address. Space tell firm politics ago nation. Impact send middle enter. Itself mention wait do any appear. General vote stock prepare poor floor far expect. Grow direction almost on. Whom cut various moment test. Note long look million simple coach despite. Country suggest debate trial yard attack. Kitchen stuff activity pressure boy. Business figure goal together view. Exist lead trade against opportunity rock. Quickly visit result. Good husband own range report grow alone. Positive daughter eat listen. Discuss rest service generation as growth hit. Energy of during sense professional. Capital still where me. Church develop five her total. Necessary order artist order. Blood ready window. Ahead someone day yet seek student player. Fight popular discussion mouth baby. Public discuss discover president item general. That order seat. Trade who address political force. Method person maybe staff if my eat. Civil require everyone focus. Major debate into. Argue leg thus but bit kind road. Wide fact affect course adult. Early usually government experience ready move. Director most claim article option. Reality now season car. Professional president agency full because computer. Scene first whole plan control strategy. Whom science grow very. Ball minute serve vote open eat. Look stop standard whose activity nearly. Likely least we that. Baby direction benefit collection. Wear majority upon quite painting. Huge station relate speak mention. Close follow write hit foreign. Draw enough dark help what. Hot executive too address good prepare consumer degree. His kind daughter bag range field. So suggest reduce edge wall society. Opportunity certainly year as board million certain. Still benefit just rise rock firm small kid. Us director how although few management. Nature different report land. Opportunity thought Republican few. Everything order nation then. Provide role each majority include. Catch himself main policy. Seem fly soon. Believe space accept anyone. Yet rock unit true medical new guess. Social us bad value. Chance mean serve. Although water bed voice mind little imagine. Learn wind customer role situation. Ball choose book. Our seven series song type give. Action few back per ago. Nor model best physical. Scene care clearly itself. Issue financial listen group now community whole full. Ready approach popular occur ball because. West speak draw you. &quot;,<br>    &quot;author&quot;: &quot;Santosh Shrestha&quot;,<br>    &quot;status&quot;: true<br>}</pre><h3>Searching Blogs</h3><pre>POST /blogs/search<br>Content-Type: application/json</pre><pre>{<br>  &quot;query&quot;: &quot;Read system establish policy member.&quot;<br>}</pre><h3>How It Works</h3><h3>Vector Generation</h3><p>When a blog post is created, we generate vector embeddings for the content using Hugging Face’s API.</p><h3>Storage</h3><p>These embeddings are stored in PostgreSQL using the pgvector extension.</p><h3>Search Process</h3><ol><li>A query string is converted to vector form using Hugging Face.</li><li>We use pgvector’s &lt;=&gt; operator to calculate <strong>cosine similarity</strong>.</li><li>Results are ordered by similarity and filtered using a threshold (≤ 0.5).</li></ol><h3>Cosine Distance in Semantic Search</h3><ol><li>Cosine distance measures the angle between two vectors. In pgvector, returns the cosine distance. &lt;=&gt; <br>Cosine distance ranges from 0 (identical) to 1 (completely different).<br>Interpretation</li><li>Vectors are identical (maximum semantic similarity).</li><li>A lower threshold (e.g., &lt; 0.2) means only highly similar results are returned.</li><li>A higher threshold (e.g., &lt; 0.8) means more, but less similar, results are included.</li></ol><h3>Key Features</h3><ul><li><strong>Semantic Understanding</strong>: Matches based on meaning, not just keywords.</li><li><strong>Similarity Threshold</strong>: Ensures only relevant matches (≤ 0.5) are returned.</li></ul><p><strong>Project Link:</strong> <a href="https://github.com/SantoshShresthaa/semantic-search-with-postgres-and-node-express.git">https://github.com/SantoshShresthaa/semantic-search-with-postgres-and-node-express.git</a></p><h3>Additional Resources</h3><ul><li><a href="https://github.com/pgvector/pgvector">pgvector Documentation</a></li><li><a href="https://huggingface.co/docs/api-inference/index">Hugging Face API Docs</a></li><li><a href="https://sequelize.org/docs/v6/">Sequelize Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0379f1c11fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up K3s on Oracle Cloud: A Lightweight Kubernetes Cluster With Master-Agent Setup]]></title>
            <link>https://medium.com/@santoshshrestha.sh/setting-up-k3s-on-oracle-cloud-a-lightweight-kubernetes-cluster-with-master-agent-setup-0a7dfea07cc5?source=rss-47c4c93e96cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a7dfea07cc5</guid>
            <dc:creator><![CDATA[Santosh Shrestha]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 04:31:11 GMT</pubDate>
            <atom:updated>2025-04-30T04:31:11.595Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*OMEQUILulKADF87dN8ch8A.png" /></figure><p>As a DevOps engineer or cloud enthusiast, spinning up your own lightweight Kubernetes cluster is a rewarding step toward building scalable and secure infrastructure. Recently, I had set up a <strong>K3s cluster on Oracle Cloud Infrastructure (OCI)</strong>, and I wanted to document the entire process — from configuring VCNs to launching both server and agent nodes.</p><p>This guide is beginner-friendly yet detailed enough for intermediate users, and it includes tips to improve security and performance throughout.</p><h3>Why Use K3s Over K8s?</h3><p>Before jumping into the setup, let’s understand <em>why K3s</em>:</p><ul><li><strong>Lightweight</strong>: K3s is optimized for edge and resource-constrained environments.</li><li><strong>Simplified</strong>: It bundles required components and trims down the complexity of vanilla Kubernetes.</li><li><strong>Fast Setup</strong>: You can go from zero to a working cluster in just a few minutes.</li><li><strong>Secure Defaults</strong>: K3s disables legacy, insecure features out of the box.</li></ul><h3>Prerequisites</h3><ul><li>Two Ubuntu-based OCI instances (one for the <strong>server/master</strong>, one for the <strong>agent/slave</strong>).</li><li>Basic knowledge of the Linux CLI and Oracle Cloud Networking.</li><li>SSH access to both instances.</li></ul><h3>Step 1: Configure Your VCN Security Rules</h3><p>Oracle Cloud restricts inbound traffic by default. To enable communication between nodes, adjust the security list attached to the Virtual Cloud Network (VCN) as follows:</p><ol><li>Go to your <strong>Oracle Cloud dashboard</strong>.</li><li>Navigate to:<br> Your Instance → Virtual Cloud Network (VCN) → Security → Security Lists</li><li>Edit the <strong>Security List</strong> attached to both your instances and add the following <strong>Ingress Rule</strong>:</li></ol><pre>Source CIDR: 0.0.0.0/0<br>Protocol: TCP<br>Port Range: 6443<br>Description: Kubernetes API access</pre><blockquote><em>⚠️ </em><strong><em>Note:</em></strong><em> Allowing 0.0.0.0/0 is useful for testing, but for production, it’s recommended to </em><strong><em>whitelist specific IPs</em></strong><em> or set up a </em><strong><em>bastion host</em></strong><em> to avoid exposing the API publicly.</em></blockquote><h3>Step 2: Update IPTables (Optional — For Troubleshooting)</h3><p>On both instances, you can flush and set permissive iptables rules if you face connectivity issues:</p><pre>iptables -P INPUT ACCEPT<br>iptables -P OUTPUT ACCEPT<br>iptables -P FORWARD ACCEPT<br>iptables -F<br>iptables --flush</pre><blockquote><em>⚠️ </em><strong><em>Security Warning</em></strong><em>: This opens all traffic. Use only for debugging and revert once networking is verified. UFW is a better long-term solution (more on this later).</em></blockquote><h3>Step 3: Install K3s Server (Master Node)</h3><p>Log in to your <strong>master node</strong> and run:</p><pre>curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC=&quot;--tls-san &lt;your-public-ip&gt;&quot; sh -</pre><p>Replace &lt;your-public-ip&gt; with your instance’s public IP address (e.g., 146.56.51.218).</p><p>This sets up a secure API server with a <strong>TLS SAN</strong> that lets agents connect via public IP.</p><p>Verify Installation:</p><pre>sudo systemctl status k3s</pre><h3>Step 4: Configure kubectl Access</h3><p>Once the server is up, configure your local kubectl to manage the cluster:</p><pre>sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config</pre><p>Now, test your connection:</p><pre>kubectl get nodes</pre><p>You should see the master node listed.</p><h3>Step 5: Harden the Firewall (UFW)</h3><p>Instead of opening all ports via iptables, use <strong>UFW (Uncomplicated Firewall)</strong> for better control:</p><pre>sudo apt-get install -y ufw</pre><pre>sudo ufw allow 6443/tcp   # Kubernetes API<br>sudo ufw allow 8472/udp   # Flannel VXLAN networking<br>sudo ufw allow 22/tcp     # SSH access</pre><pre>sudo ufw --force enable</pre><blockquote><em>✅ </em><strong><em>Pro Tip</em></strong><em>: Review </em><em>ufw status regularly and keep unnecessary ports closed.</em></blockquote><h3>Step 6: Install the K3s Agent (Worker Node)</h3><h3>Get Node Token from Master</h3><p>On your master node, run:</p><pre>sudo cat /var/lib/rancher/k3s/server/node-token</pre><p>Copy the token — you’ll need it for the agent installation.</p><h3>Install Agent on Worker Node</h3><p>On the worker node, run:</p><pre>curl -sfL https://get.k3s.io | \<br>K3S_URL=https://&lt;master-ip&gt;:6443 \<br>K3S_TOKEN=&lt;your-node-token&gt; sh -</pre><p>Replace &lt;master-ip&gt; with your master’s public IP and &lt;your-node-token&gt; with the token you copied earlier.</p><p>Once done, go back to the master node and verify:</p><pre>kubectl get nodes</pre><p>You should now see both the <strong>master</strong> and <strong>agent</strong> listed!</p><h3>Final Thoughts and Recommendations</h3><h3>Security Tips:</h3><ul><li>Avoid iptables -P ACCEPT unless debugging.</li><li>Use UFW and only allow the minimum necessary ports.</li><li>Consider setting up a <strong>VPN or Bastion Host</strong> for secure cluster access.</li><li>Regularly <strong>rotate your node-token</strong> and monitor logs for unauthorized access.</li></ul><h3>Monitoring &amp; Scaling:</h3><ul><li>Integrate tools like <strong>K9s</strong>, <strong>Lens</strong>, or <strong>Prometheus</strong> for cluster monitoring.</li><li>You can horizontally scale by running more agents with the same setup.</li></ul><h3>Bonus Tip:</h3><p>To expose services from your cluster to the internet, consider using a <strong>LoadBalancer service</strong>, <strong>Ingress Controller</strong> like Nginx, or MetalLB for bare-metal deployments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a7dfea07cc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Spiritual Journeys to Tech Innovations: A Blend of Tradition, Celebration, and Modern…]]></title>
            <link>https://medium.com/younginnovations-blog/from-spiritual-journeys-to-tech-innovations-a-blend-of-tradition-celebration-and-modern-a413b5b327aa?source=rss-47c4c93e96cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a413b5b327aa</guid>
            <dc:creator><![CDATA[Santosh Shrestha]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 11:40:54 GMT</pubDate>
            <atom:updated>2025-02-07T11:40:54.371Z</atom:updated>
            <content:encoded><![CDATA[<h3>YoungInnovations Weekly #442:<strong>From Spiritual Journeys to Tech Innovations: A Blend of Tradition, Celebration, and Modern Solutions</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5SZD331QMnIoY_Vd.png" /></figure><blockquote>“Tradition is not the worship of ashes, but the preservation of fire.” — Gustav Mahler</blockquote><h3><strong>My Spiritual Journey to Sankhu: Swasthani Brata Katha and Bajrayogini Temple</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CuBM7nXTU8YwP5kWBxIdAA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*yy0mTqjhJZoFldYIlZNw7A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1zkJtUPTMqskmExsLwZ4g.jpeg" /></figure><p>During my recent visit to Sankhu, I had the opportunity to witness the sacred Swasthani Brata Katha festival at Salinadi and embark on a rewarding hike to the Bajrayogini Temple. The journey was a perfect blend of spirituality and adventure, offering an unforgettable experience.</p><p>The day began with the mesmerizing sight of devotees gathering at the holy Salinadi River for a ritual bath, marking the start of the monthlong Swasthani Brata Katha festival. Married Hindu women, observing a strict fast, immersed themselves in prayers, believing that worshiping Goddess Swasthani would fulfill their wishes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzcVr_aAA9sXP2NI7sM5cw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQpiTbxjk7xICHJA9KUvbw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LQnJBx_1QkOjBT3ONXCzwg.jpeg" /></figure><p>After soaking in the spiritual energy at Salinadi, we set out on a hike towards Bajrayogini Temple, located about 2 km uphill from Sankhu. The bright morning sun accompanied us as we walked along the stone-paved trail.</p><p>Upon reaching Bajrayogini Temple, nestled midway on the hill, we were greeted by its elegant structure and a breathtaking view of lush forests, rolling hills, and distant mountain peaks. The temple, a significant center for tantric practices, is surrounded by ancient shrines and caves where the Eighty Siddhas of Hindu tradition are believed to have meditated. The tranquil ambiance made it the perfect place to rest and reflect before retracing our steps back.</p><h3>Knowledge Sharing Session on NestJS &amp; Elastic search: Building Scalable Search Solutions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgE-POFgqeQZnPewfek_zg.png" /></figure><p>Dikshya(<a href="https://medium.com/u/517d6b29509a">dikshya ghale</a>) provided an in-depth understanding of API implementation using a NextJS. She covered key components such as controllers, services, interceptors, and modules, explaining their roles in maintaining a clean and efficient architecture. The session also delved into exception handling using filters, database management with TypeORM, PostgreSQL, and MySQL, and the importance of defining entity relationships and migrations. CRUD operations were discussed with a focus on validation and decorators to ensure data integrity. Additionally, she emphasized best practices, including auto-loading entities and implementing authentication mechanisms for secure API development. The session was insightful, providing a comprehensive guide to building scalable and well-structured APIs.</p><p>Did you miss the KSS? No worries — you can still catch up! 🎥 <a href="https://drive.google.com/file/d/1htza-0xI2hs0Qv94fp-PPId9WwXsdP0M/view?usp=sharing">Watch it here</a>.</p><blockquote>Giving a NestJS presentation with live coding during a KSS was both exciting and nerve-wracking. I started with an overview of its architecture and benefits. During the live coding session, I got stuck while setting up Swagger, briefly disrupting the flow. After a few awkward minutes, I fixed the issue and moved on. Despite the hiccup, the session ended well. The experience taught me to stay calm under pressure, think quickly, and boosted my confidence in live coding and explaining concepts. — Dikshya Ghale</blockquote><h3>Saraswati Puja — Basanta Panchami</h3><p>सरस्वती मया दृष्टा<br>वीणापुस्तक धारिणी ।<br>हंसवाहन संयुक्ता विधादानं करोतु मे ॥</p><blockquote>Mother Saraswati, who is as bright as the moon,<br>adorned with a white robe, a harp in her hand, and a gift-giving crystal garland, a goddess seated on a white lotus flower, worshiped by Brahma, Vishnu, and Shiva, disintegrates our ignorance and gives us pure knowledge.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*UHrhS_nVIowsJSUkOIS7VA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*8pUgi3TzCA91bKF9Fx8-5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*qgQr8WcIJ-gewoEOpxkP6Q.png" /></figure><p>On the auspicious occasion of <strong>Saraswati Puja</strong>, let us seek the blessings of the Goddess of wisdom, music, and learning. May her grace illuminate our minds and lead us to knowledge and enlightenment. <strong>Happy Saraswati Puja!</strong></p><p>Saraswati Puja, also known as <strong>Shri Panchami</strong> or <strong>Basant Panchami</strong>, marks the celebration of Goddess Saraswati — the embodiment of knowledge, wisdom, and music. This sacred day signifies the end of winter and the joyful arrival of spring, the king of all seasons.</p><h3><strong>February 7 — Rose Day: A Blooming Start to Valentine’s Week!</strong> 🌹❤️</h3><p>Valentine’s Week has officially begun, and what better way to start than with <strong>Rose Day</strong>! Today, love, friendship, and admiration take center stage as people exchange roses to express their feelings. Whether it’s a red rose for love, a yellow one for friendship, or a pink one for appreciation, every rose carries a special meaning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sdA6JAn0uFP7nKq3ttgqbg.png" /></figure><p>How many of you gave or received a rose today? 🌹✨ Whether it was from a special someone, a dear friend, or even a self-love gesture, let’s celebrate the joy of spreading love and positivity! Share your Rose Day moments in the comments! 💬💕</p><p>Whether you’re diving into traditions, celebrating love, or building something amazing, take a moment to enjoy the journey. Have a great weekend filled with wisdom, warmth, and a little bit of tech magic!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a413b5b327aa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/younginnovations-blog/from-spiritual-journeys-to-tech-innovations-a-blend-of-tradition-celebration-and-modern-a413b5b327aa">From Spiritual Journeys to Tech Innovations: A Blend of Tradition, Celebration, and Modern…</a> was originally published in <a href="https://medium.com/younginnovations-blog">YoungInnovations&#39; Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elevating December: From Peaks to Progress in a Week of Celebration]]></title>
            <link>https://medium.com/younginnovations-blog/elevating-december-from-peaks-to-progress-in-a-week-of-celebration-0f2530a3646b?source=rss-47c4c93e96cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f2530a3646b</guid>
            <category><![CDATA[younginnovations]]></category>
            <category><![CDATA[ict]]></category>
            <category><![CDATA[mountains]]></category>
            <dc:creator><![CDATA[Santosh Shrestha]]></dc:creator>
            <pubDate>Fri, 15 Dec 2023 11:49:56 GMT</pubDate>
            <atom:updated>2023-12-15T11:49:56.027Z</atom:updated>
            <content:encoded><![CDATA[<h3>YoungInnovations Weekly #400: Elevating December — From Peaks to Progress in a Week of Celebration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jvi90T3WfYABrqS9.png" /></figure><blockquote>“You should enjoy the little detours to the fullest. Because that’s where you’ll find the things more important than what you want.” <br>— Ging Freecss, Hunter x Hunter</blockquote><h3><strong>International Mountain Day</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ol5G7xKhX1ytoQfx.jpg" /></figure><p>Nepal’s enduring connection with its hills and the Himalayas, marked by trust and respect, is globally recognized. Despite being hailed as the capital of mountains, Nepal joins the world in celebrating International Mountain Day on December 11, emphasizing the crucial theme of “Restoring mountain ecosystems” this year. The Himalayas not only captivate with their beauty but also sustain our lives through interconnected relationships — streams flowing from their heights and clouds precipitating from the seas. While Nepal takes pride in its Himalayan biodiversity and production, challenges loom. Global climate change and seismic activities threaten the Himalayan foundation, prompting the need for urgent conservation efforts. In extending best wishes to all facing these challenges, it’s time to contemplate the diminishing base of our mountains and the road ahead.</p><h3>World Human Rights Day</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l7i8DBVTdkO-zpF0.jpg" /></figure><p>Human Rights Day, observed annually on December 10th, serves as a poignant reminder of the fundamental rights and freedoms that every individual is entitled to, regardless of race, gender, religion, or nationality. Commemorating the day the United Nations General Assembly adopted the Universal Declaration of Human Rights in 1948, this occasion emphasizes the global commitment to protecting and promoting the inherent dignity and equality of all people. It stands as a beacon, inspiring advocacy for justice, freedom, and peace worldwide. On this day, we reflect on the progress made in the pursuit of human rights and acknowledge the ongoing challenges, fostering a collective determination to create a world where every person can live with dignity and respect.</p><h3>Scripting Success: A New Chapter for Our QA Intern</h3><p>Team, let’s extend a warm welcome to our newest QA Intern! 🎉👋 We’re thrilled to have you on board as we collectively venture into the realm of software excellence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGbqdwkPd9de3iTuUUvJ_A.jpeg" /><figcaption><strong>Sujit Nepal</strong></figcaption></figure><blockquote>Hello! I’m Sujit Nepal, currently living in Kirtipur. I’m pursuing my bachelor’s degree in Computer Science Information and Technology. I am currently doing my internship in Young Innovation Pvt Ltd as QA intern. In my spare time, I enjoy trekking through the beautiful landscapes, playing football, and cycling whenever I get the chance.</blockquote><h3>Birthday Bonanza: Wishing Our HR Pro and Web Maestro a Fantastic Birthday Bash!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*0XB8Dc139beq-6fg" /></figure><blockquote>Happy Birthday Aayusha K.C — Our HR Dynamo 🌟🎂! Your energy and HR expertise keep our team thriving. May this year bring you boundless joy and exciting challenges! 🎉 #HRPowerhouse #BirthdayCheers</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*qi40QfZ2Pg-W3pIJ" /></figure><blockquote>Cheers to Bisoj, Our Frontend Trailblazer! 🎉🎂 Your journey as a trainee brightens our days. May this birthday mark the start of amazing achievements and growth for you! 🚀 #FrontendRockstar #BirthdayJoy</blockquote><h3>Ama Yangri Getaway: Two Days of Mountain Magic</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*1uebepuCJCvUqeeS.jpg" /></figure><p>Join us for a breathtaking adventure! We’re heading to Ama Yangri for two days of mountain marvels. If you’re ready for an unforgettable experience, pack your bags and meet us on Saturday as we embark on this extraordinary journey. The more, the merrier! 🎒✨</p><p>If you’re ready for an adventurous journey to Yama Angri, don’t miss out! Fill out the form now to secure your spot and embark on this thrilling experience. Click <a href="https://forms.gle/tFd29VRK31kdo6gZA">here</a> to access the form.</p><p><em>That’s it for this week, folks! We’ll see you with fresh talks next week!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f2530a3646b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/younginnovations-blog/elevating-december-from-peaks-to-progress-in-a-week-of-celebration-0f2530a3646b">Elevating December: From Peaks to Progress in a Week of Celebration</a> was originally published in <a href="https://medium.com/younginnovations-blog">YoungInnovations&#39; Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>