<?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: Noting in 4K</title>
    <description>The latest articles on DEV Community by Noting in 4K (@notingin4k).</description>
    <link>https://dev.to/notingin4k</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%2F1479138%2F7905855a-be1d-47ba-a845-7f99cc0cf829.JPG</url>
      <title>DEV Community: Noting in 4K</title>
      <link>https://dev.to/notingin4k</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/notingin4k"/>
    <language>en</language>
    <item>
      <title>Learnings from GenAI on AWS at Deloitte workshop</title>
      <dc:creator>Noting in 4K</dc:creator>
      <pubDate>Tue, 04 Jun 2024 03:18:45 +0000</pubDate>
      <link>https://dev.to/notingin4k/learnings-from-genai-on-aws-at-deloitte-workshop-140n</link>
      <guid>https://dev.to/notingin4k/learnings-from-genai-on-aws-at-deloitte-workshop-140n</guid>
      <description>&lt;p&gt;I attended an in-personal workshop provided by Deloitte and AWS for NZ TechWeek24 on 22nd of May, noted down some key points that I probably can learn further with hands-on projects later. &lt;/p&gt;

&lt;h3&gt;
  
  
  Key concepts:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;LLMOps&lt;/li&gt;
&lt;li&gt;Considerations for shortlisting LLMs&lt;/li&gt;
&lt;li&gt;Hallucination &amp;amp; Retrieval-Augmented Generation (RAG) pattern&lt;/li&gt;
&lt;li&gt;Embeddings&lt;/li&gt;
&lt;li&gt;Conversational Buffer Memory&lt;/li&gt;
&lt;li&gt;Prompt Engineering Techniques&lt;/li&gt;
&lt;li&gt;Fine Tuning (just lightly touched)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Some use cases in Deloitte we went through:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Customer support GenAI POC - understand customer query, extract relevant parts, draft email/slack responses (100% consistency of response msgs), and then provides links to knowledge base - 25% decreased request handling time&lt;/li&gt;
&lt;li&gt;Knowledge Base Summarisation for Chorus - &lt;a href="https://www.deloitte.com/nz/en/about/media-room/deloitte-new-zealand-achieves-aws-generative-ai-competency.html"&gt;more to read&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Query Structured Data from internal supported vector data store - using the same stack/tools we used in labs below&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The stack and tools we used in the labs:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python boto3&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/bedrock/"&gt;Amazon Bedrock&lt;/a&gt; - fully managed service for using foundation models from Amazon and third parties&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://python.langchain.com/"&gt;LangChain&lt;/a&gt; - Python and JS libraries, provides convenient functions for interacting with Amazon Bedrock’s models and related services like vector databases&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://streamlit.io/"&gt;Streamlit&lt;/a&gt; - quickly creates web UI from Python without much frontend skills, great for POCs (&lt;a href="https://docs.streamlit.io/develop/api-reference"&gt;Streamlit API Reference&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/blogs/machine-learning/getting-started-with-amazon-titan-text-embeddings/"&gt;Amazon Titan Embeddings&lt;/a&gt; - converts natural language text into numerical representations for later use cases such as searching or comparing semantic similarity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are interested in GenAI on AWS, there are a few &lt;a href="https://skillbuilder.aws/generative-ai"&gt;skill builder free labs for AI Readiness&lt;/a&gt; to explore around.&lt;/p&gt;

</description>
      <category>workshop</category>
      <category>genai</category>
      <category>aws</category>
    </item>
    <item>
      <title>Troubleshoot dependencies in Pipfile/pipenv</title>
      <dc:creator>Noting in 4K</dc:creator>
      <pubDate>Thu, 09 May 2024 03:05:00 +0000</pubDate>
      <link>https://dev.to/notingin4k/troubleshoot-dependencies-in-pipfilepipenv-27d3</link>
      <guid>https://dev.to/notingin4k/troubleshoot-dependencies-in-pipfilepipenv-27d3</guid>
      <description>&lt;p&gt;The Docker build failed in one of my projects on building pip wheel. As a Python newbie, I was not sure what it refers to, all I got is a dependency build stack trace that ends with &lt;code&gt;AttributeError: cython_sources&lt;/code&gt;. I assume this is one of the packages hidden in the pip dependency tree. Eventually I managed to locate it but it took me for a while, thus I think it might be helpful to note down the troubleshooting process that I went through - at least for future me who has gold fish memory. &lt;/p&gt;

&lt;p&gt;First I scratched the pip surface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pip list&lt;/code&gt; to print the installed dependencies, got a looong list but nothing exactly matched the errored source. (Also tried &lt;code&gt;pip freeze&lt;/code&gt; but didn't get any luck.)&lt;/li&gt;
&lt;li&gt;searched in Pipfile.lock file for &lt;code&gt;cython&lt;/code&gt; but nothing popped up. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I went to Uncle Google for &lt;code&gt;cython&lt;/code&gt; and got this issue from last year: &lt;br&gt;
&lt;a href="https://github.com/yaml/pyyaml/issues/724"&gt;https://github.com/yaml/pyyaml/issues/724&lt;/a&gt;&lt;br&gt;
Good news - it's closed!&lt;/p&gt;

&lt;p&gt;From this issue, I learnt that &lt;code&gt;cython&lt;/code&gt; is a dependency for &lt;code&gt;pyyaml&lt;/code&gt;. I probably can look for this thing instead. &lt;/p&gt;

&lt;p&gt;I figured that we can install and print out the pip dependency tree from the &lt;a href="https://github.com/pypa/pipfile"&gt;pipfile project&lt;/a&gt;, some Q&amp;amp;As on Stack Overflow, and the helpful manual of &lt;code&gt;pipenv&lt;/code&gt; cli.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;pipenv shell&lt;/code&gt; to spawn a shell within the virtualenv;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pipenv verify&lt;/code&gt; to ensure the Pipfile.lock is up-to-date;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pipenv sync -d&lt;/code&gt; to install all packages and &lt;em&gt;dev packages&lt;/em&gt; specified in the Pipfile.lock;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pipenv graph&lt;/code&gt; to display currently installed dependency tree.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;MY Pipfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
requests = "*"

[requires]
python_version = "3.10"

[dev-packages]
pre-commit = "*"
black = "*"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dependency tree I got:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
$ pipenv graph
black==22.10.0
├── click [required: &amp;gt;=8.0.0, installed: 8.1.3]
├── mypy-extensions [required: &amp;gt;=0.4.3, installed: 0.4.3]
├── pathspec [required: &amp;gt;=0.9.0, installed: 0.10.1]
├── platformdirs [required: &amp;gt;=2, installed: 2.5.2]
└── tomli [required: &amp;gt;=1.1.0, installed: 2.0.1]
Flask==2.2.2
├── click [required: &amp;gt;=8.0, installed: 8.1.3]
├── itsdangerous [required: &amp;gt;=2.0, installed: 2.1.2]
├── Jinja2 [required: &amp;gt;=3.0, installed: 3.1.2]
│   └── MarkupSafe [required: &amp;gt;=2.0, installed: 2.1.1]
└── Werkzeug [required: &amp;gt;=2.2.2, installed: 2.2.2]
    └── MarkupSafe [required: &amp;gt;=2.1.1, installed: 2.1.1]
pre-commit==2.20.0
├── cfgv [required: &amp;gt;=2.0.0, installed: 3.3.1]
├── identify [required: &amp;gt;=1.0.0, installed: 2.5.7]
├── nodeenv [required: &amp;gt;=0.11.1, installed: 1.7.0]
│   └── setuptools [required: Any, installed: 65.5.0]
├── PyYAML [required: &amp;gt;=5.1, installed: 6.0]
├── toml [required: Any, installed: 0.10.2]
└── virtualenv [required: &amp;gt;=20.0.8, installed: 20.16.5]
    ├── distlib [required: &amp;gt;=0.3.5,&amp;lt;1, installed: 0.3.6]
    ├── filelock [required: &amp;gt;=3.4.1,&amp;lt;4, installed: 3.8.0]
    └── platformdirs [required: &amp;gt;=2.4,&amp;lt;3, installed: 2.5.2]
requests==2.28.1
├── certifi [required: &amp;gt;=2017.4.17, installed: 2022.9.24]
├── charset-normalizer [required: &amp;gt;=2,&amp;lt;3, installed: 2.1.1]
├── idna [required: &amp;gt;=2.5,&amp;lt;4, installed: 3.4]
└── urllib3 [required: &amp;gt;=1.21.1,&amp;lt;1.27, installed: 1.26.12]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally I found PyYAML is one of the dependencies of the &lt;code&gt;pre-commit&lt;/code&gt; dev packages. &lt;/p&gt;

&lt;p&gt;What solved my issue is to re-sync Pipfile.lock file from Pipfile, even tho I didn't update anything in it. Because I use wildcard &lt;code&gt;*&lt;/code&gt; to pull the latest version for dev packages, when I do &lt;code&gt;pipenv install&lt;/code&gt;, there are many dependency changes in the lock file. PyYAML has bumped from &lt;code&gt;6.0&lt;/code&gt; to &lt;code&gt;6.0.1&lt;/code&gt; - and this fixed the docker build issue. Yay!&lt;/p&gt;

</description>
      <category>python</category>
      <category>pipenv</category>
      <category>pipfile</category>
    </item>
  </channel>
</rss>
