<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Llm on Andreas Happe</title>
    <link>https://snikt.net/categories/llm/</link>
    <description>Recent content in Llm on Andreas Happe</description>
    <generator>Hugo -- 0.147.7</generator>
    <language>en</language>
    <lastBuildDate>Mon, 14 Oct 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://snikt.net/categories/llm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LangGraph: Adding Plan-and-Execute Planner</title>
      <link>https://snikt.net/blog/2024/10/14/langgraph-adding-plan-and-execute-planner/</link>
      <pubDate>Mon, 14 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://snikt.net/blog/2024/10/14/langgraph-adding-plan-and-execute-planner/</guid>
      <description>&lt;h1 id=&#34;adding-plan-and-execute-planner&#34;&gt;Adding Plan-and-Execute Planner&lt;/h1&gt;
&lt;p&gt;All sources can be found in &lt;a href=&#34;https://github.com/andreashappe/offensivegraphs/tree/dbe5ae76d044e6dc876dcb86029f853a30bac565&#34;&gt;our github history&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When using LLMs for complex tasks like hacking, a common problem is that they become hyper-focused upon a single attack vector and ignore all others. They go down a &amp;ldquo;depth-first&amp;rdquo; rabbit hole and never leave it. This was experienced by &lt;a href=&#34;https://arxiv.org/abs/2310.11409&#34;&gt;me&lt;/a&gt; and &lt;a href=&#34;https://arxiv.org/abs/2308.06782&#34;&gt;others&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;plan-and-execute-pattern&#34;&gt;Plan-and-Execute Pattern&lt;/h2&gt;
&lt;p&gt;One potential solution is the &lt;a href=&#34;https://arxiv.org/abs/2305.04091&#34;&gt;&amp;lsquo;plan-and-solve&amp;rsquo;-pattern&lt;/a&gt; (often also named &lt;a href=&#34;https://langchain-ai.github.io/langgraph/tutorials/plan-and-execute/plan-and-execute/&#34;&gt;&amp;lsquo;plan-and-execute&amp;rsquo;-pattern&lt;/a&gt;). in this strategy, one LLM (the &lt;code&gt;planner&lt;/code&gt;) is given the task of creating a high-level task plan based upon the user-given objective. The task plan is processed by another LLM module (the &lt;code&gt;agent&lt;/code&gt; or &lt;code&gt;executor&lt;/code&gt;). Basically, the next step from the task plan is taken and forwarded to the executer to solve within in a limited number of steps or time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LangGraph: Simplify our Tool-Calling Agent through `create_react_agent`</title>
      <link>https://snikt.net/blog/2024/10/12/langgraph-simplify-our-tool-calling-agent-through-create_react_agent/</link>
      <pubDate>Sat, 12 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://snikt.net/blog/2024/10/12/langgraph-simplify-our-tool-calling-agent-through-create_react_agent/</guid>
      <description>&lt;h1 id=&#34;simplify-our-tool-calling-agent-through-create_react_agent&#34;&gt;Simplify our Tool-Calling Agent through &lt;code&gt;create_react_agent&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;LangGraph has some amazing &lt;a href=&#34;https://langchain-ai.github.io/langgraph/reference/prebuilt/&#34;&gt;Prebuilt Components&lt;/a&gt;, one of them is the &lt;a href=&#34;https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent&#34;&gt;&lt;code&gt;create_react_agent&lt;/code&gt; function&lt;/a&gt; that allows you to hughely simplify creating new tool-using agents.&lt;/p&gt;
&lt;p&gt;The full source code can be found &lt;a href=&#34;https://github.com/andreashappe/offensivegraphs/blob/b806dbc2196434137393cbc411ab7c879c70c7a9/src/switch-to-react.py&#34;&gt;within our github history&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-simplified-version&#34;&gt;The simplified version&lt;/h2&gt;
&lt;p&gt;This willb e based upon our &lt;a href=&#34;2024-10-11-configuration-for-tool-calls.md&#34;&gt;recent configuration-improved version&lt;/a&gt;. Similar to that version, we start by reading the configuration data, setting up our LLM, connecting to the target system via SSH, and configuring tools for usage through LLMs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>LangGraph: Improving Configuration Handling, esp. for Tools</title>
      <link>https://snikt.net/blog/2024/10/11/langgraph-improving-configuration-handling-esp.-for-tools/</link>
      <pubDate>Fri, 11 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://snikt.net/blog/2024/10/11/langgraph-improving-configuration-handling-esp.-for-tools/</guid>
      <description>&lt;h1 id=&#34;improving-configuration-handling-esp-for-tools&#34;&gt;Improving Configuration Handling, esp. for Tools&lt;/h1&gt;
&lt;p&gt;While being quite happy that the &lt;a href=&#34;2024-10-10-first-steps-and-initial-version.md&#34;&gt;initial prototype&lt;/a&gt; worked within hours, its code was very prototype-y, i.e., much of its configuration was hard-coded. In a second step, we want to fix this by making our target information (the SSH connection) configurable and remove all hard-coded credentials from the code.&lt;/p&gt;
&lt;h2 id=&#34;big-picture&#34;&gt;Big Picture&lt;/h2&gt;
&lt;p&gt;We are already using &lt;a href=&#34;https://pypi.org/project/python-dotenv/&#34;&gt;python-dotenv&lt;/a&gt; for some of our configuration so it makes sense to further utilize this for more configuration data. In the improved implementation, our &lt;code&gt;.env&lt;/code&gt; will look like this:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
