A multi-agent LLM-based blog generator

Just launched Blogsmith, a multi-agent LLM-based blog generator. See its own self-reflective blog and MIT-licensed code at GitHub - ptarau/blogsmith: A multi-agent LLM-based blog generator . Also, you can try it out on a topic of your choice at: https://blogsmith.streamlit.app/ .

It uses a graph + embeddings + vector store’ based ranking algorithm to keep only the most salient sentences at each iteration. This results in a focussed and (hopefully) hallucination-free result.

3 Likes

Hi there. I looked at the codebase. Don’t see anything related to agentic behavior. How do the agents function and what is their role in the system? Where are the agents being generated from? Is it LLM - to - LLM back and forth or just “tool calls → agent → return info to main → back to user?”?

Note: tried the generator. Took a couple minutes to respond, so curious as to here more about how the backend is working. Is it a single response → re-prompt same LLM “thread” (i.e. with same context window continuity?) with a standard “perform x analysis/restatement” instruction → continued through multiple stages of this? Or what?

Also here’s the result. Actually pretty sweet as a blog post, it’s very much in that “blog post” style - lots of questioning, etc. Doesn’t read like a normal LLM prompt response at all.

Nice work!

For reference if your curious as to the test case:

## Merging Science and Spirituality: Exploring the Human Soul

(prompt was: How to provide the existence of the human soul by merging material and spiritual science)

The Intersection of Curiosity and Science:

In a world marked by rapid technological progress and an ever-increasing grasp of the material universe through science, there persists a question that continues to capture our curiosity: does the human soul exist? This question delves into the essence of our identity and our connection with the cosmos. The seeming divide between science and spirituality can create skepticism and resistance, making it hard for both camps to find common ground. Yet, exploring this question is not just a philosophical pursuit but a deeply personal journey for many. Concepts such as love, intuition, and consciousness often resist the stringent analysis that science demands, hinting at realms of human experience that seem to call for a spiritual explanation.

Bridging the Divide of Understanding:

Empirical science has gifted us with profound insights into the workings of the physical universe. However, there remains a vast landscape of human experience and existential wonder that feels beyond the grasp of quantification. Often seen as opposing forces, science is rooted in empirical data and reproducibility, while spirituality embraces the mystical and subjective elements that evade conventional measurement. The task of merging these two understanding methods is not only daunting but also a journey that could lead to incredible transformation.

The Challenge of Proving the Soul:

The challenge of proving the existence of the human soul in our technologically advanced world lies in its intertwined nature with our personal and subjective experiences. People from various walks of life report sensations like intuitive insights and transcendent love, which material science often dismisses as mere biochemical reactions. Yet, these ideas hint at deeper spiritual profundities. Science offers insights through fields like neurochemistry and psychology, providing measurable data on these phenomena, but often dismisses them when viewed through a purely material lens.

The Need for Interdisciplinary Research:

The perceived gap between science and spirituality leads to skepticism in dialogues between them. Scientists are trained to trust strictly empirical data, while spiritualists often draw on personal experiences, which are frequently dismissed as anecdotal. Bridging this gap calls for the use of philosophical inquiry, interdisciplinary research, and new ways of thinking that incorporate qualitative understandings. We need individuals who are skilled in both domains and courageous enough to venture into new intellectual territories.

Synthesis of Objective and Subjective Perspectives:

By examining elements like love, intuition, and consciousness through both scientific and spiritual lenses, we can create new frameworks that synthesize objective and subjective perspectives. The soul, as a concept tied deeply to our sense of identity and universal place, remains a source of fascination. We face the challenge of recognizing that while the scientific aspects of a phenomenon can be understood, the qualitative spiritual dimensions demand their own kind of analysis. This endeavor sits at the heart of philosophical inquiries into human existence, offering a broader spectrum of understanding.

A Holistic Approach to Understanding Human Existence:

The rich domain of human experience—including emotions, thoughts, and metaphysical reflections—often requires more interpretive tools than science alone can provide. Neuroscience can map brain activity during spiritual experiences, but it is through an open interpretation of spiritual practices that we might derive their significance in relation to the soul. This holistic approach doesn’t aim to subordinate one perspective to the other but seeks a synthesis that values empirical evidence alongside personal experience.

Embracing Innovative and Interdisciplinary Paths:

In this way, we can navigate personal phenomena and experiences like intuition and love, which resist simple scientific classification yet clearly suggest dimensions beyond our empirical grasp. Embracing innovative and interdisciplinary paths allows us to view these experiences through both lenses. By doing so, we can refresh our understanding of the soul, elevate our personal narratives, and deepen our shared comprehension of human existence within the universe’s grand mystery.

LLM COST: 0.057254999999999986

1 Like

Hi @paul.tarau,

It’s great to see you back!
I still have a copy of your recursors app on my device. Looking forward to try this!

@lucid.dev the agents are defined in the blogger.py

1 Like

Oooo I see. Very interesting. I didn’t realize that this was how people were defining Agents. Now I understand. This helps me a lot. Makes sense. So “Agent” use in this blog application is, if I understand it correctly:
a specific re-prompting of a new LLM context window with different initial instructions and output from a previous response/different context window

Thus you say that:

  • prompt/instructions #1 = Output #1
  • Output #1 → [modify context window] + prompt/instructions #2 = Output #2

So on and so forth. And that’s what people mean by “Agent”.

Different than how I had been thinking, but this is logical to me in sense.

I personally consider that all one “Thread” because you are NOT doing concurrent/simultaneous/parallel iteration.

Thus in my opinion from a “practical” standpoint it’s simply a single “agent” or a single “thread” but a modification of the context window each time based on the iterative “turn” that’s occurring. I had been considering “Agent” as more of an active and parallel-processing idea.

So on my end, I consider everything that occurs as a back-and-forth a single “Thread” or single “Agent”, and that the modifications to the context window don’t count as using a new “Thread” of conceptual work, rather simply that each thread allows for a dynamic modification of the context window in whatever way is appropriate. But that IF that “Thread” actually spawns a direct LLM call on it’s own and waits for that new threads/agents response and accepts it as a new prompt in Thread #1, THEN it’s agentic. Because then you get LLM-to-LLM flow directly, as opposed to LLM-to-system-back-to-same-thread.

But I think I’m being semantic, and it’s cool to see this “Agent” application code in action!!

1 Like

Yes, it often makes sense to have multiple agents work in parallel (e.g., for finding the cheapest flight or best research paper on a topic) but in this case as the blog building is seen as a sequential task, it made sense to chain them together sequentially. Still, if the blog would be about an overview involving visits to multiple sites to collect information, sending out the agents in parallel would be the right design choice.

1 Like