avatarLaxfed Paulacy

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1803

Abstract

dynamic prompts</span> lcel = LCEL() user_request = <span class="hljs-string">"How can I qualify for a mortgage?"</span> rephrased_question = lcel.rephrase_question(user_request) selected_sources = lcel.pick_sources(rephrased_question) chunks = lcel.retrieve_chunks(selected_sources) final_output = lcel.inject_context(chunks)</pre></div><h2 id="eb98">Content Idea Generation with InstaAI</h2><p id="8355">To generate content ideas, InstaAI follows a straightforward multi-step process:</p><div id="7257"><pre><span class="hljs-comment"># Generate content ideas</span> <span class="hljs-attr">selected_blog_posts</span> = insta_mortgage_sitemap.select_random_posts() <span class="hljs-attr">analyzed_posts</span> = content_ai.analyze_posts(selected_blog_posts) <span class="hljs-attr">rough_draft</span> = content_ai.create_rough_draft(analyzed_posts) <span class="hljs-attr">refined_draft</span> = content_ai.refine_draft(rough_draft) <span class="hljs-attr">important_details</span> = content_ai.extract_details(refined_draft)</pre></div><h2 id="bb3a">LangSmith for Debugging and Monitoring</h2><p id="56e1">LangSmith played a significant role in debugging and logging throughout the development process. It enabled precise monitoring and improvement of interactions within each module. Here’s how it was used for debugging and monitoring:</p><div id="78ba"><pre><span class="hljs-keyword">from</span> langsmith import LangSmith

<span class="hljs-comment"># Debugging and monitoring</span> lang_smith = LangSmith() lang_smith.<span class="hljs-built_in">debug</span>(<span class="hljs-attribute">module</span>=<span class="hljs-string">"MortgageAI"</span>, <span class="hljs-attribute">event</span>=<span class="hljs-string">"User query"</span>, <span class="hljs-attribute">data</span>=user_query) l

Options

ang_smith.monitor_performance(<span class="hljs-attribute">module</span>=<span class="hljs-string">"ContentAI"</span>, <span class="hljs-attribute">performance_data</span>=metrics)</pre></div><h2 id="31c8">Results and Future Capabilities</h2><p id="1ef9">The transformation has yielded impressive results, with significant improvements in efficiency, client satisfaction, and error rates. Early results show a 67% increase in speed to resolution and a decrease in error rates. Moving forward, InstaMortgage intends to continue working with LangChain to further its AI capabilities and deliver the best experience for both its employees and clients.</p><p id="769d">By leveraging Langchain and LangSmith, InstaMortgage has successfully transformed mortgage operations, demonstrating the power of AI in reshaping traditional industries.</p><div id="0e4e" class="link-block"> <a href="https://readmedium.com/langchain-extraction-benchmarking-89f20015a8e9"> <div> <div> <h2>LANGCHAIN — Extraction Benchmarking</h2> <div><h3>The function of good software is to make the complex appear to be simple. — Grady Booch</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*nu7ZXSdSXeo6aCLEJYoZpg.jpeg)"></div> </div> </div> </a> </div><p id="9324">This tutorial provides a glimpse into how Langchain and LangSmith can be utilized to transform mortgage operations. Whether it’s simplifying the construction of dynamic prompts or debugging and monitoring AI modules, these tools empower developers to revolutionize mortgage operations with AI.</p></article></body>

LANGCHAIN — Can Langchain Langsmith Transform Mortgage Operations?

I’m not a great programmer; I’m just a good programmer with great habits. — Kent Beck

Langchain Langsmith can indeed transform mortgage operations by streamlining processes and enhancing client satisfaction. Let’s explore how InstaMortgage leveraged Langchain and LangSmith to create InstaAI, an AI platform with three core modules powered by Langchain & LangSmith.

Utilizing LCEL for Dynamic Prompts

LangChain’s LCEL played a crucial role in developing InstaAI’s three core modules. It simplified the construction of dynamic prompts across various data sources and facilitated the generation of content ideas. Here’s how it was used to construct prompts across various data sources:

from langchain import LCEL

# Construct dynamic prompts
lcel = LCEL()
user_request = "How can I qualify for a mortgage?"
rephrased_question = lcel.rephrase_question(user_request)
selected_sources = lcel.pick_sources(rephrased_question)
chunks = lcel.retrieve_chunks(selected_sources)
final_output = lcel.inject_context(chunks)

Content Idea Generation with InstaAI

To generate content ideas, InstaAI follows a straightforward multi-step process:

# Generate content ideas
selected_blog_posts = insta_mortgage_sitemap.select_random_posts()
analyzed_posts = content_ai.analyze_posts(selected_blog_posts)
rough_draft = content_ai.create_rough_draft(analyzed_posts)
refined_draft = content_ai.refine_draft(rough_draft)
important_details = content_ai.extract_details(refined_draft)

LangSmith for Debugging and Monitoring

LangSmith played a significant role in debugging and logging throughout the development process. It enabled precise monitoring and improvement of interactions within each module. Here’s how it was used for debugging and monitoring:

from langsmith import LangSmith

# Debugging and monitoring
lang_smith = LangSmith()
lang_smith.debug(module="MortgageAI", event="User query", data=user_query)
lang_smith.monitor_performance(module="ContentAI", performance_data=metrics)

Results and Future Capabilities

The transformation has yielded impressive results, with significant improvements in efficiency, client satisfaction, and error rates. Early results show a 67% increase in speed to resolution and a decrease in error rates. Moving forward, InstaMortgage intends to continue working with LangChain to further its AI capabilities and deliver the best experience for both its employees and clients.

By leveraging Langchain and LangSmith, InstaMortgage has successfully transformed mortgage operations, demonstrating the power of AI in reshaping traditional industries.

This tutorial provides a glimpse into how Langchain and LangSmith can be utilized to transform mortgage operations. Whether it’s simplifying the construction of dynamic prompts or debugging and monitoring AI modules, these tools empower developers to revolutionize mortgage operations with AI.

Langchain
ChatGPT
Transform
Langsmith
Mortgage
Recommended from ReadMedium