Wednesday, December 18, 2024

RAG and Agents: How AI is Learning to Think and Act

In the rapidly evolving landscape of artificial intelligence, two technologies are fundamentally changing how AI systems interact with the world: Retrieval-Augmented Generation (RAG) and AI Agents. While both enhance AI capabilities, they serve distinctly different yet complementary purposes in advancing machine intelligence.

RAG: The Power of Grounded Knowledge

Imagine trying to navigate a foreign city using only your general knowledge of how cities work. You might make educated guesses about where to find the downtown area or how the transit system operates, but you'd likely make many mistakes. This is similar to how traditional Large Language Models (LLMs) operate – they rely on their training data to make informed but potentially inaccurate assumptions.

RAG transforms this paradigm by giving LLMs access to specific, relevant information in real-time. Instead of relying solely on their training data, RAG-enabled systems can pull precise information from your organization's documents, databases, and knowledge bases. This means when you ask a question about your company's Q4 2023 results, the AI isn't generating a plausible-sounding response – it's retrieving and synthesizing actual data from your financial reports.

The impact of RAG on accuracy and reliability cannot be overstated. In healthcare, for instance, RAG-enabled systems can access the latest medical research rather than relying on potentially outdated training data. In legal applications, they can reference specific case law and regulations rather than generating generic legal-sounding language.

Agents: From Knowledge to Action

While RAG revolutionizes how AI systems access information, Agents take things a step further by adding autonomous action to the mix. An AI Agent is more like a capable assistant than a simple question-answering system. It can:

  1. Plan and execute multi-step tasks
  2. Interact with external tools and systems
  3. Maintain context across conversations
  4. Learn from past interactions
  5. Make decisions based on evolving situations

Consider a customer service scenario. A RAG-enabled system might accurately answer questions about your return policy by referencing your documentation. An Agent, however, could actually process the return, check inventory for replacements, schedule a pickup, and update your CRM – all while maintaining a natural conversation with the customer.

The Synergistic Future

The real magic happens when RAG and Agents work together. Imagine an AI system that can not only access your entire corporate knowledge base but also take action based on that information. It could:

  • Monitor market trends and automatically adjust your digital advertising strategy
  • Analyze customer feedback across channels and initiate appropriate response workflows
  • Review legal documents and prepare necessary compliance filings
  • Manage complex project timelines while adapting to real-time changes

Practical Implications for Businesses

The combination of RAG and Agents represents a significant leap forward in business process automation. Organizations can now build systems that don't just provide information but actually complete complex workflows with minimal human intervention.

However, this power comes with responsibility. As these systems become more capable, it's crucial to implement proper governance structures, ensuring that AI actions align with business objectives and ethical considerations.

Looking Ahead

As both RAG and Agent technologies continue to mature, we're likely to see increasingly sophisticated applications that blur the line between knowledge systems and autonomous actors. The key will be finding the right balance between automation and human oversight, ensuring that these powerful tools enhance rather than replace human decision-making.

The future of AI isn't just about smarter systems – it's about systems that can both understand and act upon that understanding in meaningful ways. RAG and Agents are just the beginning of this transformative journey.

Saturday, December 14, 2024

Getting Started with AI: A 15-Hour Learning Journey

Want to become AI-savvy in just two weeks? Here's a focused learning path that requires only about an hour a day. This guide explores four essential themes that will transform how you interact with AI:

  1. Learning from AI Experts: How to leverage AI podcasts to build your knowledge foundation
  2. The Art of Iteration: Mastering the technique of refining your prompts to get better results
  3. Trust but Verify: Developing critical thinking skills to verify AI-generated content
  4. Smart Summarization: Converting lengthy AI conversations into powerful, reusable prompts

Let's dive into these themes through practical exercises and real-world examples that will help you harness AI effectively in your daily life.

Week 1: Building Your Foundation (7.5 hours)

Deep Dive into AI Through Podcasts (2.5 hours)

Start your journey by listening to carefully selected podcasts during your commute or daily routine. I recommend you choose only one or  two for your regular listening pleasure:

Mastering Prompt Iteration (2 hours)

Spend time practicing with AI chatbots, focusing on refining your prompts. Here's a fun example:

Initial Prompt:

"Write about dogs"

Improved Iteration:

"Write a 300-word guide about choosing the right dog breed for apartment living, including considerations for size, energy level, and noise"

Final Iteration:

"Create a comprehensive guide for apartment dwellers considering a dog. Include:

  • Top 5 breeds suited for apartment living
  • Exercise requirements for each breed
  • Noise levels and training tips
  • Space considerations
  • Estimated monthly costs

Format this as a practical guide with clear headings and bullet points"

Summary Iteration:

I often ask the chatbot to provide an improved prompt based upon the contents of the session.

  • "Please rewrite the prompts within this session into a single well-engineered prompt"

Asking the AI chatbot to rewrite your prompt really helps in deepening your understanding of prompt engineering.

And to make things interesting I sometimes ask the chatbot to rewrite the response with different literacy levels.

  • "Please rewrite this response for a grade five literacy level"
  • "Please rewrite this response for a PhD literacy level"
I actually find the response for the grade eight literacy level more interesting than the PhD level.

Using the different AI chatbots (3 hours)

There are many emerging AI chatbots, build some prompts within each. Experiment with different AI chatbots: Play, get curious, ask the AI bot to rewrite your prompt, try the rewrites against all these different chatbots, compare and contrast their responses.

  • ChatGPT: Excellent for creative writing and coding
  • Claude: Strong at analysis and detailed explanations
  • Gemini: Particularly good with multimodal tasks
  • Perplexity: Specialized in real-time information retrieval and citation

Week 2: Advanced Techniques (7.5 hours)

Verification Strategies (4 hours)

Learn to verify AI outputs effectively with these examples:

When you have Historical Facts:

"You mentioned the Wright brothers' first flight was in 1903. Can you:

  1. Provide specific sources for this date
  2. Break down the key events of that day
  3. Highlight any details you're uncertain about"

When you asked for Technical Advice:

"You've suggested this Python code solution. Can you:

  1. Explain why each line is necessary
  2. Identify potential edge cases
  3. Compare it with alternative approaches"
When you wanted Financial Analysis:

"You've provided a financial forecast for my small business. Can you:
  1. Explain the key assumptions behind your projections
  2. Identify potential economic factors that could impact these numbers
  3. Compare this forecast with industry benchmarks
  4. Highlight any areas where you have limited data or uncertainty
  5. Suggest additional data points that could improve the accuracy of this analysis"
These  are three examples of verification for your AI outputs. It is always a good idea to request verification as it reduces the AI hallucinations and increases your knowledge of the topic being discussed.

Work through the sessions from last week and write prompts to verify the information in an AI output. Spend a few hours creating verification prompts, ask the AI to write these for you. Improve upon the verification prompts, iterate.

An AI hallucination occurs when an artificial intelligence generates information that appears plausible but is factually incorrect or nonsensical. 

Session Summarization (3.5 hours)

Master the art of creating comprehensive prompts from AI sessions. Here's an example:

Original Conversation:

  • Human: "How can I improve my public speaking?"
  • AI: [Provides tips about preparation]
  • Human: "What about handling nervousness?"
  • AI: [Shares anxiety management techniques]
  • Human: "How should I structure my speech?"
  • AI: [Explains speech organization]

Summarized into Single New Prompt:

"Create a comprehensive public speaking guide for beginners that covers:

  1. Essential preparation steps
  2. Anxiety management techniques
  3. Speech structure and organization
  4. Delivery tips
  5. Common pitfalls to avoid

Include specific examples for each section and actionable steps for implementation"

Practical Exercise Examples

Try these exercises during your learning journey:

1. Content Creation:

  1.    Ask AI to write a blog post, then iterate three times, each time making it more specific
  2.    Example progression:
    •    "Write about healthy eating"
    •    "Write about healthy eating for busy professionals"
    •    "Create a 7-day meal prep guide for busy professionals who have only 30 minutes for dinner"

2. Problem Solving:

  •    Start with a complex problem like home organization
  •    Break it into smaller tasks
  •    Ask AI to verify the feasibility of each step
  •    Create a final, comprehensive action plan

Reminder: Ask AI to summarize a session and all its progressive steps into a single new prompt. Use this prompt in the different chatbots.

Key Takeaways

After completing this learning path, you'll have:

  • A solid understanding of current AI capabilities and limitations
  • Practical experience in prompt engineering
  • The ability to verify and validate AI outputs
  • Skills to maintain efficient AI conversations

Remember: Success with AI tools comes from systematic practice and refinement. Start with simple queries and gradually increase complexity as you become more comfortable with the interaction patterns.

Pro Tip: Keep a "prompt journal" documenting your most effective prompts and the situations where they worked best. This will help you develop your own library of reliable AI interaction strategies.

Tuesday, December 10, 2024

Finding Growth in the Gaps: How Career Breaks Fuel My Tech Journey

As a technology professional, I've discovered an unexpected rhythm in my career - one that turns the spaces between projects into powerful catalysts for growth. Every successful project completion brings not just a sense of accomplishment, but also a valuable gift: a few months of dedicated learning time. These self-directed sabbaticals, occurring naturally in my three-year career cycles, have become essential periods of exploration and reinvention.

Denis Hassabis and Hannah Fry
My current sabbatical feels particularly significant as I navigate the transformative world of Artificial Intelligence. Building upon my foundation in Machine Learning and data science, I've immersed myself in the AI landscape over the past two months. After exploring numerous AI podcasts, I've found two standout sources that consistently deliver valuable insights: "Google DeepMind: The Podcast" for cutting-edge AI research and developments, and "The Artificial Intelligence Show" by Marketing AI Institute for practical business applications.

This deep dive has also included extensive hands-on experimentation with leading Large Language Models (LLMs). Through countless hours working with ChatGPT, Claude, Gemini, and Perplexity, I've developed a nuanced understanding of each platform's strengths and refined my prompt engineering expertise. This practical experience has been invaluable in understanding the real-world capabilities and limitations of current AI technology.

This intensive learning period has already yielded tangible results. I've developed a comprehensive two-week learning module focused on AI fundamentals and practical applications, designed to help professionals enhance their productivity through AI tools. This resource embodies what I find most rewarding about these career interludes - the ability to synthesize new knowledge and share it with others who are eager to embrace technological advancement.

These deliberate pauses between opportunities aren't just breaks - they're investments in staying ahead of the technology curve. Each sabbatical allows me to emerge stronger, more knowledgeable, and better equipped to tackle the next challenge. In an industry that evolves at lightning speed, these learning periods have proven to be my secret weapon for sustained career growth and innovation.

Tuesday, October 29, 2024

Thank-you Keyin College

Another successful three years (well, three years and five months) working in an area I love; technology and adult learning. This was a great three years where I utilized my research and experience in integrating agile technologies and techniques into education. As a faculty we managed the complexity, and risk, of integrating an additional 40 students per semester into the program. And best of all, I taught over 200 students JavaScript, Node.js, SQL, PostgreSQL, Mongodb, GitHub, and how all these fit into FullStack development. It was definitely three years and five months well spent.

Three year successes

My career success seems to occur in three year cycles, I've written about this in the past. It would seem that my time with Keyin College follows the same pattern, I have just finished another three year cycle. Background to this three year theme (with focus on adult learning) can be found here;

  1. career success in three year cycles
  2. Increasing access to legal education

Gratitude

I like to share the success. I may have been the leader for a few things at Keyin College, but I couldn't have done it alone. These are the things where I am grateful for the staff at Keyin College;

Steve Taylor for encouraging me to participate in the early program design and for supporting me in becoming program head while we onboarded 60 students a semester.

Christa Mitchell for filling the role of career counselor while I was being onboarded to Keyin. So much to learn so little time. Also, for acting as my proxy when important items needed to be escalated to senior management. I know I can be demanding as an employee, I believe we should all be heard and an organization never knows where their diamond on the beach may be.

Sushanta for being good at want you do and your follow-through is exceptional!

Eric Bailey for helping me understand the overall technical architecture of Keyin's network, infrastructure, and approach to IT. Couldn't have made sense of things without you!

Maurice for being 5 hours older than me and providing the wisdom I needed to understand Keyin College (Or understand the best I could).

Roy Brushett and Will Durocher for those brainstorming sessions four years ago where we covered many important topics that defined the overall FullStack curriculum. Where Agile methodologies fit with Software Engineering and with Pedagogy, our use of O'Reilly for text books (saving students and Keyin considerable $$), the programming languages to be used, where source management (GitHub) fit within our Agile approach, Which board (Kanban or Scrum or both) we would use, etc. So good, great to be involved with the initial design and too see it through to teaching many courses as the whole program stabilized.

All the Faculty for allowing me the privilege of being in your service. We reduced risk and successfully went from 18 students to over 50 in one semester. Job well done. Thanks for your support. It was an honour to be your program head.

And of course, the Students! Honestly, I learn more than I teach. Your questions, your feedback, all our 1 on 1's, the tutorials, and encouraging me to develop workshops on an introduction to and intermediate github. Students are the best! We wouldn't be here without you!

Next Steps

I am being drawn back into the technical realm. Give teaching a break again for a while, focus on shipping software and building a team to exceed expectations. I am good at this so why not lean heavily into a startup, manage / mentor a team, leverage my knowledge of big data, database design and administration, draw upon the family (and personal) history of engineering, or even consider a director or executive position (if someone will have me, I'm so much better in a supporting role).

If you need someone with my background or experience please reach out. Thanks again Keyin College!

Tuesday, May 14, 2024

Blogging in a time of AI

I am renewing my frequency in blog posting. This will come after an almost 5 year break from blogging. I am returning because I am back to working on open-source software, educational projects, and the digitization of oceans. And I know I have a learning and success journey to share. 

Some Background

I started blogging twenty years back. Yes, 20 years. I was an early adopter and I was involved with technology startups and how the internet was influencing education. At this time I was a big believer that blogging was about content creation. Adding to the collective of the internet by adding meaningful and descriptive content rather than only being a consumer of content. To date, I have published over 500 posts to my assorted blogs. Most of this work was in the first 10 years of my blogging. I essentially posted once a month for the first 10 years. I did have a year where I posted over 100 times. As a summary this is how I posted over the last 20 years.

2004 to 2014 - I published 420 blog posts with good readership. I had a year where I posted more than 100 times. I set this as a goal / experiment to see if I could post twice a week. I did this while holding full-time work, which meant many early mornings and late evenings writing. I learned a whole bunch and my writing skills improved. 

The themes for these first ten years was mostly; 

  • technology leadership for startups, 
  • hard-core technology and approaches, 
  • innovative and emerging education, 
  • and the intersection of these three.

2015 to 2024 - I published only 41 blog posts during this 10 years, and nothing in the past three years. Honestly, I was distracted by raising my family of three and doing a whole bunch of life living. Not so focused on work and career advancement. 

The themes for the last ten years have mostly been; 

  • integrating with technology community in St. John's NL (I moved), 
  • continue my work on digital badges and micro-credentials,
  • development of an ocean data startup (still a work in progress),
  • and working the idea of a reference architecture for the digitization of oceans.

Most exciting of all this is more than 1/2 million views during the 20 years and at some points having over 2500 weekly views. What have I learned from all this blogging? Mostly, that having to write and publish openly to the internet helps the overall community knowledge and it helps me learn more deeply in these chosen subjects.

Next Steps

Again, I will use blogging as my cognitive gymnasium. My subjects themes haven't changed and I will focus upon two main subject areas and continue with updates to this critical technology blog;

  1. Education technology, Heutagogy, and the self-directed learner.
  2. Many things related to, and in support of, the authoring a reference architecture for the digitization of oceans.
  3. And my continued musings about technology through my gen X view of the world.

With all my work and R&D efforts I will learn a bunch of stuff and apply this to the real world through the successful projects I am a part of. I will reflect upon these successes and all that I have learned I will create content that can provide further learning for those around me. And hopefully they will also be entertaining reads.

Collaborating with your AI partner

Blogging has changed for me. There has been a lot of technical and social change since I did most of my blog posting over a decade ago. I had a few focused subjects I was very passionate about, and I wrote about them often. I wrote unincumbered for I would consider myself an early adopter and there was less people publishing to the internet in my chosen subjects. Today there is much more content covering these subjects. And all this content comes in photos, videos, audio, and written articles. Artificial Intelligence is doing a great job of creating and summarizing the content which addresses the complex audience needs and their questions and prompts. Content creation has changed. For a human content creator I believe our work needs to be more intelligent, critical, and creative. Content creators in a time of AI need to do what the AI cannot; daydream, reflect on unrelated subjects, see unlikely connections, be critical, add meaning, create new content that falls between the generated content, fact check and confirm, and add more human intelligence.

How will my blog writing process change? Um, it already has...

I must reflect and draw upon my mastery and do my best to add the new content that AI cannot... AI needs our creativity because it has already parsed the published body of human knowledge. For more insight on my approach, use your favorite large language model chatbot (ChatGPT, Gemini) with the prompt 'limitations of generative AI' followed by the prompt 'How would you suggest a human writer overcome these AI limitations'.

Step by Step my blogging will partner with AI and follow this basic approach;

  1. Capture ideas for new posts, be verbose, be imaginative, think about context
  2. Put these ideas to incomplete blog posts, work ideas for days, for weeks...
  3. Read extensively, add to the understanding of any specific idea
  4. Keep references, cut and paste to the bottom of the related incomplete posts
  5. Prompt AI with phrases from the idea generation
  6. Take blocks of text from written ideas and push them into generative AI, be critical, harvest what you can.
  7. Take the written blog post and ask AI for a rewrite. Change your audience. be critical, harvest what you can.
  8. Try and see, try and write, what AI cannot... add to the body of human knowledge.
  9. Add story telling to improve the overall post
  10. Find pictures to support the writing, format for engagement. Use AI to generate images from passages of text taken from the blog post.
  11. Format, edit, improve, repeat. Be bold... Publish.
  12. Use AI to improve the quality of the writing... Publish again.
  13. Rest, reflect, improve... Publish again.
  14. Yes, I am an advocate to publish before writing is perfect. Publish and then make improvements over the days and weeks that follow. Once the post is considered finished finished... promote it on social media.
  15. Identify what is most important about the post and rewrite for the LinkedIn business audience. Publish to LinkedIn.
  16. Repeat...


Friday, April 09, 2021

The Leanstack Way

The Oceans of Data Lab is honored to be a part of PropelICT's startup accelerator. We had our kickoff meeting a few days ago and the current focus is on learning the Leanstack methodology and using lean canvas to tease out ALL the important details for success. The inline supporting learning modules that are available through leanstack are very helpful. 


The Lean Canvas - numbers indicate the order of completion

I feel fortunate that I have been familiar with Agile and Lean approaches for over 20 years. I've got two favorite sayings I use when running software teams, and I like to think I run many aspects of my life with an Agile / Lean mindset.

  1. Ship and ship often (deliver new releases as often and frequently as possible)
  2. Fail and fail often (take risks, innovate, don't apologize, keep moving), success comes from failure.

For me the use of Lean in startups all began with Eric Ries when I watched a YouTube interview of Eric conducted a decade ago. This interview became a part of a 2011 blog post where I describe lean approaches within the Director of Technology role. Since this time I have revisited the works of Eric Ries every few years, he has a lot of useful insights to lean startups. One of my all time favorites in the talk he gave at Google 10 years back.


Google Talk: Eric Ries and the Lean Startup


Thursday, April 08, 2021

ODL Newsletter - March 2021

The Oceans of Data Lab (ODL) monthly newsletter is also finding its footing. It is still going to include monthly updates to the progress we make AND it will start with a few articles of interest within the data labs technology world. I am discovering so many interesting technologies and approaches within the data realm. I'm going to fold my 30 years of data experience into why I believe these are of interest to those working with large amounts of data.

Apache Data Lab

The Apache data lab that comes from the same organization that has brought us so many of the important technologies over the years. And specifically, to think of all the big data technologies they have delivered in recent years... there are just to many to list. What I like most about the data lab is its ability to be deployed to the big three cloud hosting environments. Super smart given the storage and compute requirements for data projects shouldn't be the responsibility of Apache.

DataOps and the DataKitchen

DataOps is a fairly recent concept / term that is about seven years old... and it makes sense that it becomes a discipline in itself as it is not DevOps for Data, it is so much more. The DataKitchen looks to be doing some amazing work in this capacity and have published a good read to help get your head into this important and emerging technology space.

I'm another 3 people into working towards my 100 conversations. It is said that you need to have 100 conversations as you solidify your business / startup idea. So I managed to get another three conversations in. I know this isn't that many, but that's ok as this month was more about setting up technology and thinking about risk, revenue, and the escalator pitch for the startup. I still need to talk with people, and I need peoples help, always. If you know anyone who works with analyzing data or works for a business that has a growing interest in their data, I'd love to talk with them.

What has changed this month?

Over this month my thinking has broadened and become more focused on the needs of organizations and their data. No real pivot, but clarifying what the business will be. The changes fell into three main themes;

  • A broader interest in helping people with their data. The backstory to my career has always been the information technology around the data. For 30 years I have focused on managing, moving, and building software for the data. This will continue with the data lab. We are still interested in ocean data and a reference architecture for the digitization of oceans, these subjects will become part of the bigger data lab.
  • It's a Data Lab. It became very clear this month that what I was wanting to do is stand up and run a data lab. I had a great conversation with Graham Truax at Innovation Island and this identified the alignment with my accelerator pitch and the data lab concept. After I re-read my proposal (and subsequent acceptance) to the PropelICT accelerator I confirmed... the startup is focused on creating a data lab with related products and services.
  • Start with a services focus, rather than product. We need revenue and the data lab is not a small product with a near MVP that can generate revenue. There are a number of MVP's that could bring business value for our customers, but nothing with significant revenue possibility. So our focus needs to be on services where we can leverage the skills and knowledge of the founder and identify projects that align well with the overall vision for Oceans of Data Lab.

It's been a business and technology focused month

This really was a more technology focused month. It was getting all the infrastructure in place to have the lab, fetch some data, and display a basic analytics dashboard. So while setting things up, we weren't that focused on reaching out to potential customers.

What are the risks and assumptions?

We also thought about what are the business risks and what assumptions are we making that could work against our success. We are not going to get into these in detail, writing them down and publishing them helps attract attention and hopefully getting the feedback we need to reduce the risk and prove or disprove the assumptions. We are also focused on what can be a product rather than what is a service.

Assumptions

  1. Companies / Organizations will participate in a publish - subscribe business model for data sets
  2. The data lab concept for preparing data sets for publishing will become accepted by SMB 

Risks

  1. MVP doesn't generate enough revenue or provide business value
  2. Primary founder having knowledge, energy, or bandwidth to keep up the pace
  3. Finding skilled employees with deep understanding of data engineering
  4. High cost of cloud based infrastructure 

Where is the revenue?

  • The transactional costs in the publish and subscribe (every data set transaction earns money)
    • this is definitely my riskiest assumption
  • SMB pay for services in preparing the data sets for themselves and the marketplace.
    • does the rise of the data engineer role show a willingness to pay for data preparation

What do we consider our Escalator Pitch?

These are early times and we don't yet have a story to tell. Gak! The escalator pitch is hard, and we really don't know what we are doing when it comes to an escalator pitch.

  • We help SMB realize new revenue possibilities from their existing data.
  • We reduce the cost of data preparation for their internal analysis and business intelligence.
  • We provide the services and technology to help you make sense of all your data. 
  • We make it easy for you to see the value and opportunities based upon your unique business data.

Next Steps:

  • We need to focus on the customer. We need to find the customers and talk to them.
  • We need to reduce our risk and prove, or disprove, our assumptions.
  • We need a technical platform to host an Minimum Viable Product (MVP). I need to identify and prioritize a few MVP's.

If you find the Data Lab an interesting idea or have the need to bring greater value to your existing data, please feel free to contact me. We are building a business and we want to help you bring greater value from your data.