<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shanelle</title>
    <description>The latest articles on DEV Community by Shanelle (@shanelle).</description>
    <link>https://dev.to/shanelle</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1104659%2Fd9681f46-f920-447b-939c-38194394ea5e.png</url>
      <title>DEV Community: Shanelle</title>
      <link>https://dev.to/shanelle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shanelle"/>
    <language>en</language>
    <item>
      <title>Testing GPT-4 Vision with Lightrail</title>
      <dc:creator>Shanelle</dc:creator>
      <pubDate>Wed, 15 Nov 2023 00:03:26 +0000</pubDate>
      <link>https://dev.to/shanelle/testing-gpt-4-vision-with-lightrail-4ala</link>
      <guid>https://dev.to/shanelle/testing-gpt-4-vision-with-lightrail-4ala</guid>
      <description>&lt;h3&gt;
  
  
  Intro
&lt;/h3&gt;

&lt;p&gt;With the recent Developer Day, OpenAI has announced several exciting updates to ChatGPT and its sister products. In addition to faster APIs and the GPT App Store, they also updated the GPT-4 model so that it can take images as input. Before, GPT-4 was a purely text model, whereas now it can take text and images as input and output text in response. As you can imagine, this opens up a variety of exciting applications for its users. &lt;/p&gt;

&lt;p&gt;Today, I wanted to walk through some interesting applications of GPT-4 Vision with &lt;a href="https://github.com/lightrail-ai/lightrail#installation"&gt;Lightrail&lt;/a&gt; (an open-source Desktop app that I’ve been contributing to). It’s an open-source AI command center for developers. It has an always-on ChatGPT instance and integrates with apps like Jupyter, VScode, &amp;amp; Chrome. I’ve personally found it an easier way to access an LLM and automatically give it the necessary context in my queries without constantly copying &amp;amp; pasting into ChatGPT. &lt;/p&gt;

&lt;h3&gt;
  
  
  Generate Code from Screenshots
&lt;/h3&gt;

&lt;p&gt;With the plethora of coding assistants on the market today, you can use LLMs to generate code based on text instructions. For example, you can instruct Github Copilot to create a SignUp Button in React or bootstrap a new microservice for an enterprise-scale codebase. However, if you want to generate a clone of a screenshot or replicate the color &amp;amp; component styling of one of your favorite websites, it was previously difficult to give ChatGPT or the other coding assistants the necessary context. &lt;/p&gt;

&lt;p&gt;Now, with GPT-4 Vision and Lightrail, you can take a screenshot and describe what you would like to build or how you would like to modify the screenshot, and Lightrail can generate the relevant code right in your VSCode editor. The video below shows how a freelance frontend engineer might use Lightrail to tweak the styling of a React component based on a client request from a screenshot. &lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://player.vimeo.com/video/882694040" width="710" height="399"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Ask Q’s about an Image
&lt;/h3&gt;

&lt;p&gt;Beyond using Lightrail’s vision feature to generate code, you can feed in images and ask questions. Think of it as a more powerful Google Lens that can be accessed cross-application. Some of my favorite applications include analyzing charts &amp;amp; graphs, interpreting content in a PDF, or providing feedback on presentations / UX mockups. &lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://player.vimeo.com/video/884606214" width="710" height="399"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s next?
&lt;/h3&gt;

&lt;p&gt;With the latest OpenAI release, it feels like every day we’re getting closer to a future of persistent AI assistants that can ingest and interpret content in a similar manner to the way we do. Imagine having a helpful voice on your shoulder as you navigate the digital world. With Lightrail, you can already access content from across your apps and save long-form text content to a local vectorDB to create a long-term memory for your LLM. &lt;/p&gt;

&lt;p&gt;However, I’d be interested to see how technology continues to develop for multi-modal AI. I’d love to be able to access a longterm memory where I could search semantically across images, text, &amp;amp; video — all with equal accuracy to textual content. Similarly, right now, GPT-4 can use images as input, but it would be amazing if it could output both images &amp;amp; text. &lt;/p&gt;

&lt;p&gt;Anyways, thanks so much for reading. If you’re interested in testing out Lightrail, you can download it &lt;a href="https://github.com/lightrail-ai/lightrail#installation"&gt;here&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Creating a Second Brain with Lightrail</title>
      <dc:creator>Shanelle</dc:creator>
      <pubDate>Fri, 03 Nov 2023 19:17:11 +0000</pubDate>
      <link>https://dev.to/shanelle/creating-a-second-brain-with-lightrail-oja</link>
      <guid>https://dev.to/shanelle/creating-a-second-brain-with-lightrail-oja</guid>
      <description>&lt;p&gt;Ever since OpenAI emerged, ChatGPT has been my go-to for various tasks like drafting emails, planning trips, and generating and debugging code. However, its memory is confined to each session in the chat window. I'm personally interested in creating a long-term memory system where I can add notes, papers, websites, etc., and then seamlessly search across them — a concept often referred to online as a second brain. There are intriguing products like &lt;a href="http://mem.ai/"&gt;Mem.ai&lt;/a&gt; and &lt;a href="https://new.computer/"&gt;Dot&lt;/a&gt; (which caught my eye on HN this week), but I steer clear of tools that host my data due to privacy concerns and the potential for losing access if they change prices or product direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Lightrail&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I've been actively contributing to an open-source tool called &lt;a href="https://github.com/lightrail-ai/lightrail"&gt;Lightrail&lt;/a&gt;. It combines an always-on GPT-4 instance with seamless integration across various apps like Google Chrome and VSCode. However, my favorite new feature is the ability to create a personal knowledge base. I can add any text content, and Lightrail indexes and stores the information in an on-device vectorDB for use in future queries. It's open-source and local-first, making it a personal second brain that’s searchable with GPT-4. While I primarily use it for dev-focused tasks rather than miscellaneous notes, I thought it might be worth sharing a couple of my favorite hacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Indexing Dev Documentation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Like many on here, I use ChatGPT for coding-related tasks. However, I've found that Lightrail is particularly helpful whenI want to implement an obscure library or leverage documentation updated post the GPT-4 cutoff date (January 2022). I can crawl through the latest docs and use them to generate code. For instance, by providing Lightrail with the base URL to the Supabase docs, it not only indexes the intro page but also all the backlinks to ingest the entire documentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QS5DmlL4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phc6dyzfw7josfmtg5yb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QS5DmlL4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phc6dyzfw7josfmtg5yb.png" alt="Add Docs to KB" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, I can reference this knowledge base to implement Supabase authentication in my VSCode project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SQSmF3K4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6tup1y1595k4xjfl4q5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SQSmF3K4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6tup1y1595k4xjfl4q5.png" alt="Use in Coding" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Simple Code Search&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I've also crafted a simple semantic code search. By feeding all the files in a local project into my knowledge base, I can use the [Send to AI] command to ask questions like where payments are implemented or explain how a specific code snippet works in the context of the overall project—eliminating the need for continuous copy-pasting of files into ChatGPT.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a4yyoz4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tupgohpw2wepsdlsbmoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a4yyoz4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tupgohpw2wepsdlsbmoe.png" alt="Add Codebase" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gL0Olji6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3c79o4e13gfolwy36ou8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gL0Olji6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3c79o4e13gfolwy36ou8.png" alt="Simple Codebase" width="800" height="104"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Saving &amp;amp; Summarizing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In line with the second brain concept, I've started using Lightrail to save web pages, articles, and papers. Any long-form content becomes part of my knowledge base. I can then use Lightrail to summarize or ask questions. The token &lt;code&gt;kb.relevant-content&lt;/code&gt; dynamically pulls in the pertinent information from the knowledge base to answer my queries.&lt;/p&gt;

&lt;p&gt;While it's early days for Lightrail, I'm excited about the promise of on-device personal AI companions. In an industry that is evolving day by day, I hold out hope for a more local-first and open-source approach to prevail. If you're interested in giving Lightrail a try, you can download it &lt;a href="https://github.com/lightrail-ai/lightrail"&gt;here&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Reviewing AI Code Search Tools</title>
      <dc:creator>Shanelle</dc:creator>
      <pubDate>Thu, 28 Sep 2023 16:24:44 +0000</pubDate>
      <link>https://dev.to/shanelle/reviewing-ai-code-search-tools-12c2</link>
      <guid>https://dev.to/shanelle/reviewing-ai-code-search-tools-12c2</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Over the past year, there’s been an explosion of AI-assisted coding tools — Github Copilot, Codeium, and Cursor. Large language models (LLMs) have been applied for a variety of use cases for dev tools — debugging, generating code, data analysis, and more. However, one application that I’ve been particularly interested in is code search, particularly over large enterprise-scale codebases. For me personally, the most annoying part of coding has always been onboarding onto a new codebase and keeping track of the system in my head to figure out where to make my desired changes. I’ve seen a bunch of articles comparing the different code assistants, but I was curious whether any of the new AI-first code search tools were an improvement over plain old Github search. &lt;/p&gt;

&lt;p&gt;In this blog post, I’ll be comparing 3 distinct AI-first code search tools I recently came across: &lt;a href="https://about.sourcegraph.com/cody" rel="noopener noreferrer"&gt;Cody&lt;/a&gt; (developed by late-stage startup, Sourcegraph), &lt;a href="https://github.com/kantord/SeaGOAT" rel="noopener noreferrer"&gt;SeaGOAT&lt;/a&gt; (an open-source project that was trending on HN last week), and &lt;a href="https://bloop.ai/" rel="noopener noreferrer"&gt;Bloop&lt;/a&gt; (an early-stage YC startup). I’ll be evaluating them along the dimensions of user-friendliness as well as their accuracy. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why Code Search Differs from Code Generation
&lt;/h3&gt;

&lt;p&gt;However, before I delve into the comparison, let me quickly touch on why code search is different than code generation. &lt;/p&gt;

&lt;p&gt;Code search requires effectively retrieving all of the relevant files/snippets, rather than generating one of many correct answers. If you were to ask ChatGPT to generate a Tic-Tac-Toe game, many different versions of code will produce a functioning game. On the other hand, if you’re searching a codebase for “all of the files that interface with the database,” you would expect the tool to exhaustively retrieve &lt;strong&gt;all&lt;/strong&gt; of the relevant files/snippets of code. &lt;/p&gt;

&lt;p&gt;In addition, code search tools need to index the entire codebase to effectively search and retrieve relevant snippets of code. If you were to type into ChatGPT, “implement Supabase authentication,” ChatGPT leverages all of the lines of code used in training to generate the implementation code. On the other hand, for search, you need to index the entire codebase to effectively extract the correct snippets from a project. Including the entire codebase in the prompt is not an option for most non-hobby projects. Currently, the longest context window for an LLM is approximately 100,000 tokens (courtesy of &lt;a href="https://www.anthropic.com/index/100k-context-windows" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). To put this into perspective within a codebase context, companies like Square and Google have millions of lines of code. To get around this, most code search tools will pre-index the codebase with a vector DB to quickly find the relevant code snippets.&lt;/p&gt;

&lt;h3&gt;
  
  
  SeaGOAT
&lt;/h3&gt;

&lt;p&gt;This was an open-source repo I saw trending on Hacker News. It seemed promising — a local-first semantic search engine. While the other code search tools are proxying OpenAI’s or other LLM providers’ servers, I liked that this was running the model fully locally on my machine. However, I found that the semantic search did a poor job of pulling relevant snippets. For example, for the query “Where do I implement authentication?”, it pulled everything from a correct &lt;code&gt;payment-wrapper&lt;/code&gt; file to random library files. Ultimately, while I appreciated the fact that it was local-first and open-source, I found that its precision was too poor to be useful — each query returned pages of irrelevant content where 3 files/snippets would have been more helpful. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fujufh6oq62yh58l0nszq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fujufh6oq62yh58l0nszq.png" alt="Code Search with SeaGOAT"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cody
&lt;/h3&gt;

&lt;p&gt;This is a new product by the late-stage code search startup Sourcegraph. I found the setup to be a little bit confusing — I had to download a VSCode extension and a separate Desktop app, as well as sign up for a Sourcegraph account. In the Desktop app, I could then select which Github repos (public or private) to index. &lt;/p&gt;

&lt;p&gt;In terms of accuracy, it did a good job of both understanding my queries &amp;amp; extracting relevant snippets (e.g. correctly identifying the relevant components when asked “Where is the Stripe integration for payments”). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxgz0x1zsnakcs1dsekd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxgz0x1zsnakcs1dsekd.png" alt="Code Search with Cody"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, it falls prey to the classic LLM hallucination issue — when asked where the code checks if a user has signed in for checkout, it responds with a snippet that does not exist. Similarly, when asked for all of the relevant files that interface with a database, it hallucinates several files that do not exist in the project. &lt;/p&gt;

&lt;h3&gt;
  
  
  Bloop
&lt;/h3&gt;

&lt;p&gt;From a UX perspective, this was my favorite tool — it had a simple onboarding experience (OAuth through Github) and also linked the relevant files in its responses so I could easily expand beyond the response to delve into the code. While it did not have a VSCode extension, I found the Desktop app easy enough to use. I also found that it did a much better job at not hallucinating responses — correctly identifying the list of files that interface with the database as well as that there were no user sign-in checks during the checkout process. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6z2jnsuf21nje6bfuetz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6z2jnsuf21nje6bfuetz.png" alt="Code Search with Bloop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;For me, my favorite was Bloop — it did a better job of not hallucinating, and I preferred the UX. As an aside, I found that using this in combination with Github Copilot or Perplexity was a little bit frustrating — I’m constantly switching between different tools for the same project. I keep wishing for one tool that can wrap all of this functionality and context within one entry point. I've been exploring some of these ideas in &lt;a href="https://github.com/lightrail-ai/lightrail" rel="noopener noreferrer"&gt;Lightrail&lt;/a&gt;, but it doesn't include code search (as we discussed, that's a more complex challenge than code generation). Nevertheless, I'm excited about the possibilities in the field. Thanks for reading so far - I'd love to hear your thoughts and ideas on this!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
