Learning LangChain

Thank you for tuning in to this audio only podcast presentation. This is week 142 of The Lindahl Letter publication. A new edition arrives every Friday. This week the topic under consideration for The Lindahl Letter is, “Learning LangChain.”

And now it’s time to pivot toward the “Learning LangChain” topic…

The most fun introduction to LangChain seems to be from DeepLearning.ai with Andrew Ng and Harrison Chase [1]. You can expect to spend a couple of hours to complete the process of watching the videos and absorbing the content. Make sure you use a browser window large enough to support both the jupyter notebook and the video. You are probably going to want these items to run side by side. This course covers models, prompts, parsers, memory, chains, and agents. The part of this learning package that I was the most interested in learning more about was how people are using agents and of course what sort of plugins could that yield as use cases in the generative AI space. Going forward I think agency will be the defining characteristic of the great generative AI adventure. These applications are going to do things for you and some of those use cases are going to be extremely powerful. 

After that course I wanted to dig in more and decided to go ahead and learn everything I could from the LangChain AI Handbook [2]. This handbook has 6 or 7 chapters depending on how you count things. My favorite part about this learning build is that they are using Colab notebooks for hands-on development during the course of the learning adventure. That is awesome and really lets you get going quickly. A side quest spawned out of that handbook learning which involved starting to use Pinecone in general which was interesting. You can do a lot with the Pinecone including building AI agents and chatbots. 

I’m going to spend some time working on the udemy course “Develop LLM powered applications with LangChain” later this weekend [3]. You can also find a ton of useful information within the documentation for LangChain including a lot of content about agents [4].

You might now be wondering what alternatives to LangChain exist… I started looking around at AutoChain [5], Auto-GPT [6], AgentGPT [7], BabyAGI [8], LangDock [9], GradientJ [10], Flowise AI [11], and LlamaIndex [12]. Maybe you could also consider TensorFlow to be an alternative. You can tell from the combination of companies and frameworks being built out here a lot of attention is on the space between LLMs and taking action. Getting to the point of agency or taking action is where these spaces are gaining and maintaining value. 

Footnotes:

[1] https://learn.deeplearning.ai/langchain/lesson/1/introduction 

[2] https://www.pinecone.io/learn/series/langchain/ 

[3] https://www.udemy.com/course/langchain/

[4] https://python.langchain.com/docs/modules/agents/ 

[5] https://github.com/Forethought-Technologies/AutoChain 

[6] https://github.com/Significant-Gravitas/Auto-GPT

[7] https://github.com/reworkd/AgentGPT

[8] https://github.com/miurla/babyagi-ui 

[9] https://www.langdock.com/ 

[10] https://gradientj.com/ 

[11] https://flowiseai.com/ 

[12] https://www.llamaindex.ai/ 

What’s next for The Lindahl Letter? 

  • Week 143: Social media analysis
  • Week 144: Knowledge graphs vs. vector databases
  • Week 145: Delphi method & Door-to-door canvassing
  • Week 146: Election simulations & Expert opinions
  • Week 147: Bayesian Models

If you enjoyed this content, then please take a moment and share it with a friend. If you are new to The Lindahl Letter, then please consider subscribing. New editions arrive every Friday. Thank you and enjoy the week ahead.

Machine learning election models

Thank you for tuning in to this audio only podcast presentation. This is week 139 of The Lindahl Letter publication. A new edition arrives every Friday. This week the topic under consideration for The Lindahl Letter is, “Machine learning election models.”

This might be the year that I finally finish that book about the intersection of technology and modernity. During the course of this post we will look at the intersection of machine learning and election models. That could very well be a thin slice of the intersection of technology and modernity at large, but that is the set of questions that brought us here today. It’s one of things we have been chasing along this journey. Oh yes, a bunch of papers exist related to the topic this week of machine learning and election models [1]. None of them are highly cited. A few of them are in the 20’s in terms of citation count, but that means the academic community surrounding this topic is rather limited. Maybe the papers are written, but have just not arrived yet out in the world of publication. Given that machine learning has an active preprint landscape that is unlikely. 

That darth of literature is not going to stop me from looking at them and sharing a few that stood out during the search. None of these papers is approaching the subject from a generative AI model side of things they are using machine learning without any degree of agency. Obviously, I was engaging in this literature review to see if I could find examples of the deployment of models with some type of agency doing analysis within this space of election prediction models. My searching over the last few weeks has not yielded anything super interesting. I was looking for somebody in the academic space doing some type of work within generative AI constitutions and election models or maybe even some work in the space of rolling sentiment analysis for targeted campaign understanding. That is probably an open area for research that will be filled at some point.

Here are 4 articles:

Grimmer, J., Roberts, M. E., & Stewart, B. M. (2021). Machine learning for social science: An agnostic approach. Annual Review of Political Science, 24, 395-419. https://www.annualreviews.org/doi/pdf/10.1146/annurev-polisci-053119-015921 

Sucharitha, Y., Vijayalata, Y., & Prasad, V. K. (2021). Predicting election results from twitter using machine learning algorithms. Recent Advances in Computer Science and Communications (Formerly: Recent Patents on Computer Science), 14(1), 246-256. www.cse.griet.ac.in/pdfs/journals20-21/SC17.pdf  

Miranda, E., Aryuni, M., Hariyanto, R., & Surya, E. S. (2019, August). Sentiment Analysis using Sentiwordnet and Machine Learning Approach (Indonesia general election opinion from the twitter content). In 2019 International conference on information management and technology (ICIMTech) (Vol. 1, pp. 62-67). IEEE. https://www.researchgate.net/publication/335945861_Sentiment_Analysis_using_Sentiwordnet_and_Machine_Learning_Approach_Indonesia_general_election_opinion_from_the_twitter_content 

Zhang, M., Alvarez, R. M., & Levin, I. (2019). Election forensics: Using machine learning and synthetic data for possible election anomaly detection. PloS one, 14(10), e0223950. https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0223950&type=printable 

My guess is that we are going to see a wave of ChatGPT related articles about elections post the 2024 presidential cycle. It will probably be one of those waves of articles without any of them really standing out or making any serious contribution to the academy. 

The door is opening to a new world of election prediction and understanding efforts thanks to the recent changes in both model agency and generative AI models that help evaluate and summarize very complex things. It’s really about how they are applied to something going forward that will make the biggest difference in how the use cases play out. These use cases by the way are going to become very visible as the 2024 election comes into focus. The interesting part of the whole equation will be when people are bringing custom knowledge bases to the process to help fuel interactions with machine learning algorithms and generative AI. 

It’s amazing to think how rapidly things can be built. The older models of software engineering are now more of a history lesson than a primer on building things with prompt-based AI. Andrew Ng illustrated in a recent lecture the rapidly changing build times. You have to really decide what you want to build and deploy and make it happen. Ferris Bueller once said, “Life moves pretty fast.” Now code generation is starting to move even faster! You need to stop and look around at what is possible, or you just might miss out on the generative AI revolution.

You can see Andrew’s full video here: https://www.youtube.com/watch?v=5p248yoa3oE 

Footnotes:

[1] https://scholar.google.com/scholar?hl=en&as_sdt=0%2C6&q=Machine+learning+election+models&btnG= 

What’s next for The Lindahl Letter? 

  • Week 140: Proxy models for elections
  • Week 141: Building generative AI chatbots
  • Week 142: Learning LangChain
  • Week 143: Social media analysis
  • Week 144: Knowledge graphs vs. vector databases

If you enjoyed this content, then please take a moment and share it with a friend. If you are new to The Lindahl Letter, then please consider subscribing. New editions arrive every Friday. Thank you and enjoy the week ahead.

Staying focused on writing

It turns out I don’t really even want to write at the moment. After clearing my thoughts and trying to focus my attention toward a perfect possible future I did have enough energy to sit down and write for a bit. Clearly that was not an easy task to switch from being somewhat disenfranchised into a focused writing session. Sometimes bringing all your energy and focus to something requires setting everything else aside to be absolutely present in the moment. Unlocking the next big thing is about being able to create that type of focus. It’s one of the things that I am absolutely good at and it is a skill that I have developed over time. That is where we are at right now. 

During the course of this last week I have been learning more and more about how to build and deploy chatbots that take advantage of LLMs and other generative AI technologies. I’m pretty sure that the development of agency to machine learn models is going to strap rocket boosters to the next stage of technological deployment. Maybe you are thinking that is hyperbole… don’t worry or panic, but you are very soon going to be able to ask these agents to do something and they will be able to execute more and more complex actions. That is the essence of agency within the deployment of these chatbots. It’s a very big deal in terms of people doing basic task automation and it may very well introduce a distinct change to how business is conducted by radically increasing productivity.

A good Saturday morning of writing

It was a very solid morning for producing blocks of content. Instead of achieving one block of content creation this morning. Two blocks of content were actually created. Both weeks 133 and 134 were finalized and recorded. That puts me 4 weeks ahead in terms of scheduled posts. It’s nice to be locked in till Friday, August 18, 2023. My writing plan involves trying to ensure one block of content is created every week. Maybe it would be better to go back to the plan for producing a big year of writing content, but trying to produce a solid million words of content in a single year is a big task to try to accomplish. 

My attention got super focused on E138 of the All-In podcast this morning. Generally, I like to listen to people talk about things in the background. To that end podcasts are pretty great as they provide a continuously updating stream of that type of content. 

I broke away from the writing project to go see Indiana Jones and the Dial of Destiny (2023) at our local theater. My previous rating of the movies stands the same 3-5-1-2-4. I have seen all five movies at least twice per film.

Just a bit of blogging about blogging

I considered installing the ActivityPub plugin to my WordPress instance, but decided against setting up that integration until I know more about what data could be exchanged [1]. A lot of interest in ActivityPub has been building as Threads by Instagram has been launched. Maybe the social web will continue to fall apart or maybe some type of interaction system will be built out of the current ActivityPub standard or whatever comes next from that potential setup. Yesterday, my interest in the Threads application peaked. It was sort of fun to install the application and to see something new. For me the feed experience was just not very good. It was a lot of brands and social influencers trying to engage with me and that is a far cry from the mix of academic Twitter that I interact with mixed with a lot of machine learning and AI related researchers. 

My Twitter experience has always been pretty good in terms of those academic and research based connections. I’m not in the market for any advertisements of social influencers. My path is pretty clear and my work plan exists and won’t change all that much during the course of my 5 year writing plan. I’m really curious to see what happens with the most active users. All those really active users are going to end up going somewhere and they will build a critical mass. In my estimation it would be unlikely that the mass of the most active users would end up fragmented or broken apart. That need to get to a point of critical mass to allow the social network to be in the end the most social it can be will probably win out over time.

Footnotes:
[1] https://wordpress.org/plugins/activitypub/

A day of independent blogging

It took a couple of days of downtime to get into the flow of spending a bit of time blogging again. Sure you might have guessed, I spent some time thinking about buying a new System76 laptop. Outside of that the good old Pixelbook Go chromebook is still running and the battery oddly still has decent longevity. That Pixelbook was ordered back in October of 2019. As the social web continues to fall apart. No real RSS feed solutions are popping up to jump in and make it all work again. I continue to write, blog, and otherwise create blocks of prose on a weekly schedule. This bit of Independence Day blogging is both independently written and independent in spirit. Fun times abound for those who still want to create and build content.

Digging into all of my Google Keep notes

A lot of opportunities exist to focus on things. Investing a bit of time into something could be part of a plan. Earlier tonight I started digging into all of my Google Keep notes.

During one of the days at the beach recently, I sat down and started making a list of topics I would like to spend some time either researching or writing about. It turns out that list was 49 total items. Right now I’m actively working on week 128 of the writing plan. That plan was designed to run within 3 years of content so far and that would be 156 weeks worth of writing. My current backlog actually runs to week 157 and an extra list of 12 topics. That means my current backlog of items before the introduction of this new list of 49 items was 169 blocks of content which would then be extended to 218 total blocks of content. That would be over 4 years of total content between what has been written and what is in the backlog. 

Having that large a backlog is not where I normally sit with things. I don’t like to have such a large and unwieldy backlog. It may be one one of those times where I’m going to have to adapt my writing schedule to help work it down to a more manageable level of content blocks that need to be written.

Ok, I ended up making an executive decision on how to manage the backlog. It was a super disruptive decision at this point in the process. I went ahead and at the week 128 point I pasted in the new list of 49 items. That means I’m going to struggle with updating the next five weeks of forward looking items on a bunch of blocks of content, but that is a solvable problem. It’s just annoying and time consuming vs. having any really problematic nature. That does mean that starting in July you will start to get the benefit of this new backlog and strictly you are going to end up waiting about a year to return to the previously structured program.

A little bit more of that writing thing

Earlier this week, I sat right by the beach in Florida for six hours. The umbrella and chair helped. I did not bring my Chromebook to spend the time writing. That experience is probably going to happen again tomorrow. Oddly enough, my efforts to engage in some productive writing have been a wash during this trip. That is what I expected to have happened. Earlier in preparing for this degradation in writing time I had worked ahead by a couple of weeks on the writing plan. 

A photo of the beach

Ok, so on the Twitter front I’m still running my tweets in protected status and I gave up on paying them for Twitter Blue. They almost got me to come back yesterday with the annual prepayment discount. I’m more likely to commit to something for a year than on a monthly basis. Naturally, I’ll turn off any auto renewal so that I can make a decision on renewal at the proper time. Perhaps that is a strange conundrum of a preference for annual vs. monthly billing. It’s probably a contrarian opinion about Twitter, but I think it might have gotten worse for a bit then it got better. My feed of things in any event has turned into a better read over the last couple of months. 

News feeds overall are highly broken at the moment. As a side effect of the news based media portion of things fundamentally breaking the feeds are awash with poorly crafted content. News rooms while an imperfect gate keeping system provided a perspective and some degree of continuity. It’s a first in the pool free for all right now and just like academics at large the publish or perish mindset overshadows everything. 

Considering some application building

I sat down to do a little bit of writing before going to sleep tonight. The next twenty minutes are going to be devoted to putting a few thoughts down in writing. For better or worse that is the plan at the moment. You could just as easily ask ChatGPT to produce 1,000 words of nonsense, but that would be less novel than my musing probably will end up being. It would be a good idea to  spend some time with the new models trying to produce some code. It is entirely possible that the newer code generating models would allow me to work out a couple of the things that had drawn my interest twenty years ago. Some of that would be as easy as turning the pseudo code into actual code and seeing what happens. Maybe I’ll even turn some of that into some Android applications that people could download.

So much stored data

This weekend I spent a few minutes trying to figure out what to do with all the old data that resides on my computer. Most of it is backed up to the cloud. I need to spend some time just deleting blocks of data that are no longer required. I’m probably not the only person in the boat of having stored so much data that is probably not needed or useful. At this point in time, I imagine that so much just unwieldy data has been stored and forgotten by a multitude of people. It’s probably a mind boggling number to consider how many photographs that Google has backed up over the years on devices all over the world.