<?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: Vikas Awasthi </title>
    <description>The latest articles on DEV Community by Vikas Awasthi  (@vikas_awasthi).</description>
    <link>https://dev.to/vikas_awasthi</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%2F2962211%2F598d48de-ef80-439f-be70-6309cf7f75ca.jpg</url>
      <title>DEV Community: Vikas Awasthi </title>
      <link>https://dev.to/vikas_awasthi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vikas_awasthi"/>
    <language>en</language>
    <item>
      <title>A Simple Guide to AI Prompting</title>
      <dc:creator>Vikas Awasthi </dc:creator>
      <pubDate>Fri, 21 Mar 2025 07:45:37 +0000</pubDate>
      <link>https://dev.to/vikas_awasthi/a-simple-guide-to-ai-prompting-8l0</link>
      <guid>https://dev.to/vikas_awasthi/a-simple-guide-to-ai-prompting-8l0</guid>
      <description>&lt;h1&gt;
  
  
  A Simple Guide to AI Prompting
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What is AI Prompting?
&lt;/h2&gt;

&lt;p&gt;Artificial intelligence (AI) is a tool that helps people answer questions, create stories, and solve problems. But to get the best results from AI, we need to ask questions in the right way. This is called &lt;strong&gt;prompting&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;When we ask AI something, the way we phrase our question can change how helpful the answer is. If we ask a very general question, the answer might not be useful. But if we ask in a clear and detailed way, we get better results!&lt;/p&gt;

&lt;p&gt;This guide will show you different ways to ask AI questions so you can get the best responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Will Learn
&lt;/h2&gt;

&lt;p&gt;By the end of this guide, you will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand how to ask AI questions clearly.&lt;/li&gt;
&lt;li&gt;Learn different ways to phrase your questions.&lt;/li&gt;
&lt;li&gt;Try out examples of AI prompting.&lt;/li&gt;
&lt;li&gt;See how AI can be used in different areas like school, work, and creativity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How This Lesson is Organized
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is AI Prompting?&lt;/li&gt;
&lt;li&gt;Different Ways to Ask AI Questions&lt;/li&gt;
&lt;li&gt;Fun Activities to Try Prompting&lt;/li&gt;
&lt;li&gt;Questions to Think About&lt;/li&gt;
&lt;li&gt;Future of AI Prompting&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to Ask AI Good Questions
&lt;/h2&gt;

&lt;p&gt;When talking to AI, the way you ask a question matters a lot. A simple question can get a simple or unclear answer. A detailed question can get a much better answer.&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not Specific:&lt;/strong&gt; "Tell me about space."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better:&lt;/strong&gt; "Explain how stars are formed."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second question is clearer, so the AI gives a more useful answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Ways to Ask AI Questions
&lt;/h2&gt;

&lt;p&gt;Here are some ways to ask questions that help AI give better answers:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Zero-Shot Prompting
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Asking AI a question without giving any hints or examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "Translate 'Hello' into Spanish."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; "Hola."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This works when AI already knows a lot about the topic.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Few-Shot Prompting
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Giving AI a few examples before asking it to complete a task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "'Good morning' → 'Buenos días', 'Thank you' → 'Gracias'. Now translate 'How are you?'"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; "¿Cómo estás?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps AI understand what you're asking for.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Step-by-Step Prompting
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Asking AI to break down the answer into steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "If a car moves 10 miles per hour for 3 hours, how far does it go? Solve step by step."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;"Speed = 10 miles per hour"&lt;/li&gt;
&lt;li&gt;"Time = 3 hours"&lt;/li&gt;
&lt;li&gt;"Distance = Speed × Time = 10 × 3 = 30 miles"&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is great for solving math problems or explaining ideas clearly.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Checking for the Best Answer
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Asking AI to solve a problem in different ways and pick the best answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "Solve 25 + 45 using two different methods."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;"Method 1: 25 + 45 = 70"&lt;/li&gt;
&lt;li&gt;"Method 2: (20+40) + (5+5) = 70"&lt;/li&gt;
&lt;li&gt;"Final answer: 70"&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can help confirm if an answer is correct.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Role-Playing with AI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Asking AI to pretend to be an expert in a certain topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "Pretend you are a doctor. How would you explain why sleep is important?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; "Getting enough sleep helps your body heal and keeps your brain sharp."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is useful for learning from different perspectives.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Brainstorming with AI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is it?&lt;/strong&gt; Asking AI for multiple ideas instead of just one answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You:&lt;/strong&gt; "Give me three ideas for a fun science experiment."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;"Make a volcano with baking soda and vinegar."&lt;/li&gt;
&lt;li&gt;"Test how different liquids affect plant growth."&lt;/li&gt;
&lt;li&gt;"Create a homemade lava lamp with oil and water."&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is helpful for creative projects!&lt;/p&gt;

&lt;h2&gt;
  
  
  Fun Activities to Try Prompting
&lt;/h2&gt;

&lt;p&gt;Try these activities to see how AI responds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Activity 1:&lt;/strong&gt; Ask AI to explain something in simple and complex ways. Example: "Explain gravity like I’m 10 years old." Then try "Explain gravity in a detailed way."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activity 2:&lt;/strong&gt; Give AI a step-by-step math problem to solve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activity 3:&lt;/strong&gt; Ask AI to act as a character (e.g., "Pretend you are a famous scientist").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activity 4:&lt;/strong&gt; Have AI list multiple ideas for a topic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Questions to Think About
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Which way of asking questions gave the best answers?&lt;/li&gt;
&lt;li&gt;Why do detailed prompts help AI give better responses?&lt;/li&gt;
&lt;li&gt;How can AI be used in school or work to make tasks easier?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s Next for AI Prompting?
&lt;/h2&gt;

&lt;p&gt;AI is always improving, and learning how to ask it the right questions will help you get the best answers. Whether you use AI for learning, writing, or problem-solving, good prompting makes all the difference!&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What’s your favorite way to ask AI questions?&lt;/li&gt;
&lt;li&gt;How do you think AI will change in the future?&lt;/li&gt;
&lt;li&gt;What new ways could we use AI to help in everyday life?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mastering AI prompting is like learning a new language—it helps you communicate better and get smarter answers!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>promptengineering</category>
      <category>chatgpt</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>🔍 ContentLens | AI-Powered Document Insights</title>
      <dc:creator>Vikas Awasthi </dc:creator>
      <pubDate>Fri, 21 Mar 2025 07:17:55 +0000</pubDate>
      <link>https://dev.to/vikas_awasthi/contentlens-ai-powered-document-insights-o4d</link>
      <guid>https://dev.to/vikas_awasthi/contentlens-ai-powered-document-insights-o4d</guid>
      <description>&lt;h2&gt;
  
  
  Building ContentLens: My Journey Creating an AI-Powered Document Processing App
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Over the past weekend, I embarked on an exciting project to build ContentLens - a web application that uses AI to analyze and transform documents. In this blog post, I'll share my experience building this application, the technologies I used, challenges I faced, and what I learned along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is ContentLens?
&lt;/h2&gt;

&lt;p&gt;ContentLens is a simple yet powerful application that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accepts various document formats (text, markdown, JSON, DOCX, and images)&lt;/li&gt;
&lt;li&gt;Processes them using Google's Gemini AI&lt;/li&gt;
&lt;li&gt;Returns the results in markdown format that you can download&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you need to summarize a long document, extract key points, translate content, or transform it into a different format, ContentLens can help. The application is designed with simplicity and privacy in mind - all uploaded files are processed and immediately deleted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technology Stack
&lt;/h2&gt;

&lt;p&gt;For this project, I chose to work with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FastHTML and MonsterUI&lt;/strong&gt;: These frameworks provided a clean way to build server-rendered interfaces with minimal JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt;: As the backend language, handling file processing and API integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini API&lt;/strong&gt;: For the AI capabilities that power the document analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Railway&lt;/strong&gt;: For deployment and hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the Application: Step by Step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Planning the Architecture
&lt;/h3&gt;

&lt;p&gt;I began by planning a clean object-oriented architecture with these main components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Document class for handling different file types&lt;/li&gt;
&lt;li&gt;Processor class for interacting with the Gemini API&lt;/li&gt;
&lt;li&gt;Web routes for handling user requests&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. File Processing Challenges
&lt;/h3&gt;

&lt;p&gt;One of the more challenging aspects was handling different file types. Each format required a different approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text and markdown files needed simple reading&lt;/li&gt;
&lt;li&gt;DOCX files required parsing with python-docx&lt;/li&gt;
&lt;li&gt;Images needed special handling for the AI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I implemented a strategy pattern where the Document class would handle extraction differently based on file type.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Privacy and Security Considerations
&lt;/h3&gt;

&lt;p&gt;From the beginning, I wanted to ensure user privacy. I implemented:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immediate deletion of uploaded files after processing&lt;/li&gt;
&lt;li&gt;Removal of processed results after download&lt;/li&gt;
&lt;li&gt;Environment variables for API keys&lt;/li&gt;
&lt;li&gt;Input validation and error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. User Experience Enhancements
&lt;/h3&gt;

&lt;p&gt;Based on feedback from early testers, I added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File upload indicators&lt;/li&gt;
&lt;li&gt;Processing status feedback&lt;/li&gt;
&lt;li&gt;Dark mode compatibility&lt;/li&gt;
&lt;li&gt;Helpful example instructions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;This project taught me several valuable lessons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The power of separation of concerns&lt;/strong&gt;: By keeping document handling, AI processing, and web interfaces separate, the code remained clean and maintainable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The importance of user feedback&lt;/strong&gt;: Adding visual indicators for uploads and processing made the application much more user-friendly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deployment considerations&lt;/strong&gt;: Ensuring environment variables were properly set up in Railway and that file paths worked correctly in the deployed environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The value of iterative development&lt;/strong&gt;: Starting with a minimal viable product and adding features based on feedback proved effective.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Future Enhancements
&lt;/h2&gt;

&lt;p&gt;While ContentLens is functional, there are several enhancements I'm considering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for more file formats (PDF, EPUB)&lt;/li&gt;
&lt;li&gt;Batch processing of multiple files&lt;/li&gt;
&lt;li&gt;Custom AI model selection&lt;/li&gt;
&lt;li&gt;User accounts for saving processing history&lt;/li&gt;
&lt;li&gt;Additional output formats beyond markdown&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Out!
&lt;/h2&gt;

&lt;p&gt;You can try ContentLens yourself at &lt;a href="https://contentlens-production.up.railway.app" rel="noopener noreferrer"&gt;contentlens-production.up.railway.app&lt;/a&gt; or check out the code on &lt;a href="https://github.com/vikasAWA/contentlens" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I welcome any feedback or suggestions for improvement!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What I Learned &amp;amp; What's Next
&lt;/h2&gt;

&lt;p&gt;Building ContentLens taught me a lot about integrating AI APIs and creating clean architecture. I'm planning to add PDF support and batch processing next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions for you:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What other file formats would you find useful in a tool like this?&lt;/li&gt;
&lt;li&gt;Have you worked with the Gemini API? How does it compare to other LLMs?&lt;/li&gt;
&lt;li&gt;What challenges have you faced when deploying Python web apps?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd love to hear your thoughts and suggestions in the comments!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://contentlens-production.up.railway.app/" rel="noopener noreferrer"&gt;Try ContentLens&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/yourusername/contentlens" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>ai</category>
      <category>gemini</category>
    </item>
  </channel>
</rss>
