<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Converting Salesforce Data into Embeddings with OpenAI and AWS Lambda	</title>
	<atom:link href="https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/</link>
	<description>AI, Salesforce, ServiceNow &#38; Enterprise Tech Guides</description>
	<lastBuildDate>Fri, 15 Dec 2023 13:14:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Esteve Graells		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118013</link>

		<dc:creator><![CDATA[Esteve Graells]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 13:14:53 +0000</pubDate>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=11191#comment-118013</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118012&quot;&gt;Jitendra&lt;/a&gt;.

Hi Jitendra, I watched the 3 posts, but I thought posting in the first one just to help on the following 2, if you prefer I can post my comment on the third one.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118012">Jitendra</a>.</p>
<p>Hi Jitendra, I watched the 3 posts, but I thought posting in the first one just to help on the following 2, if you prefer I can post my comment on the third one.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jitendra		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118012</link>

		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 12:06:05 +0000</pubDate>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=11191#comment-118012</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118011&quot;&gt;Esteve Graells&lt;/a&gt;.

Thats great explanation Esteve, Thank You. In this blog post , there is no RAG. I am just show casing how to do embedding. RAG is happening in part 2 blog post where I have used Langchain to enrich prompt.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118011">Esteve Graells</a>.</p>
<p>Thats great explanation Esteve, Thank You. In this blog post , there is no RAG. I am just show casing how to do embedding. RAG is happening in part 2 blog post where I have used Langchain to enrich prompt.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Esteve Graells		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118011</link>

		<dc:creator><![CDATA[Esteve Graells]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 09:50:52 +0000</pubDate>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=11191#comment-118011</guid>

					<description><![CDATA[Hello Jitendra,

I would like to begin by commending your excellent example of a RAG implementation in the context of Salesforce. Thanks for sharing it with the community, very appreciate it.

However, I&#039;d like to offer some feedback regarding certain aspects of your explanation:

Touching base concepts: the concepts that you mention about training the model with RAG or emproving the model do not apply here. The MML keeps immutable and you can only enrich via fine-tunning, what is hugely expensive and need very dedicated time and effort to create datasets that are good but not contaminated. RAG is a technique to enrich a prompt not improving/incrementing a model via some pre-work before sending the request to the completion API to the model.

Input to LLM: It&#039;s important to clarify that any Large Language Model (LLM), whether it&#039;s an openAI-compatible API or not, doesn&#039;t receive a pre-existing vector or embedding as input. Instead, it processes a combination of elements, such as a custom context, system prompt, user query and optionally, an assistant prompt in the form of text, never a vector or any other form.

Purpose of Embeddings and Vector Database: The creation of embeddings and the establishment of a vector database serve the purpose of enriching the knowledge base, never to train the LLM as it can&#039;t be trained but only amplified with a huge cost (not applicable here). This knowledge base is constructed by capturing information before sending the context to the LLM by using what is called a RAG pipeline: a vector database that receives a loader (splitting and vectorizing splits) and retrievers which try to find the best semantic matches with the user query.

Semantic Search: The semantic search operation is executed on the user&#039;s query against the vector database. The results are generated based on the applied search algorithm. These results consist of the context that is subsequently sent to the LLM along with the user&#039;s request and other parts of the prompts. As you sometimes experienced the retriever can find the right semantic asnwers, because your retriever algorithm is not working well, I think you could try Contextual Compression or my favourite the Multi-query retriever.

Role of Embeddings: While creating embeddings does involve populating the vector database, it is crucial to create the right embeddings, but you didn&#039;t mention how to splitt the knowledge that you want to augment. Splitting in the wrong way without overlapping techniques and not using MMR like prompting agents will probably provide poor results.

Deployment Considerations: You mentioned encountering challenges with the use of Lambdas for deployment. It&#039;s worth noting that there are alternative deployment options much better than Lambdas. Solutions  such as Bedrock, which can facilitate the use of other LLMs that may be more tailored to your specific problem is one of my favorites. Additionally, you may consider employing larger models like Falcon to address your requirements if desired or constraints or chat ones reducing the sizing requirements a lot.

I trust that these observations will be beneficial not only to you but also to your readers, including individuals like myself who deeply appreciate the work you have undertaken. Your dedication to the Salesforce arena, and I look forward to seeing more of your contributions in the future.
Please don&#039;t hesitate to reach me if you want to clarify some of these points as I would be honored.]]></description>
			<content:encoded><![CDATA[<p>Hello Jitendra,</p>
<p>I would like to begin by commending your excellent example of a RAG implementation in the context of Salesforce. Thanks for sharing it with the community, very appreciate it.</p>
<p>However, I&#8217;d like to offer some feedback regarding certain aspects of your explanation:</p>
<p>Touching base concepts: the concepts that you mention about training the model with RAG or emproving the model do not apply here. The MML keeps immutable and you can only enrich via fine-tunning, what is hugely expensive and need very dedicated time and effort to create datasets that are good but not contaminated. RAG is a technique to enrich a prompt not improving/incrementing a model via some pre-work before sending the request to the completion API to the model.</p>
<p>Input to LLM: It&#8217;s important to clarify that any Large Language Model (LLM), whether it&#8217;s an openAI-compatible API or not, doesn&#8217;t receive a pre-existing vector or embedding as input. Instead, it processes a combination of elements, such as a custom context, system prompt, user query and optionally, an assistant prompt in the form of text, never a vector or any other form.</p>
<p>Purpose of Embeddings and Vector Database: The creation of embeddings and the establishment of a vector database serve the purpose of enriching the knowledge base, never to train the LLM as it can&#8217;t be trained but only amplified with a huge cost (not applicable here). This knowledge base is constructed by capturing information before sending the context to the LLM by using what is called a RAG pipeline: a vector database that receives a loader (splitting and vectorizing splits) and retrievers which try to find the best semantic matches with the user query.</p>
<p>Semantic Search: The semantic search operation is executed on the user&#8217;s query against the vector database. The results are generated based on the applied search algorithm. These results consist of the context that is subsequently sent to the LLM along with the user&#8217;s request and other parts of the prompts. As you sometimes experienced the retriever can find the right semantic asnwers, because your retriever algorithm is not working well, I think you could try Contextual Compression or my favourite the Multi-query retriever.</p>
<p>Role of Embeddings: While creating embeddings does involve populating the vector database, it is crucial to create the right embeddings, but you didn&#8217;t mention how to splitt the knowledge that you want to augment. Splitting in the wrong way without overlapping techniques and not using MMR like prompting agents will probably provide poor results.</p>
<p>Deployment Considerations: You mentioned encountering challenges with the use of Lambdas for deployment. It&#8217;s worth noting that there are alternative deployment options much better than Lambdas. Solutions  such as Bedrock, which can facilitate the use of other LLMs that may be more tailored to your specific problem is one of my favorites. Additionally, you may consider employing larger models like Falcon to address your requirements if desired or constraints or chat ones reducing the sizing requirements a lot.</p>
<p>I trust that these observations will be beneficial not only to you but also to your readers, including individuals like myself who deeply appreciate the work you have undertaken. Your dedication to the Salesforce arena, and I look forward to seeing more of your contributions in the future.<br />
Please don&#8217;t hesitate to reach me if you want to clarify some of these points as I would be honored.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jitendra		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118010</link>

		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 00:10:29 +0000</pubDate>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=11191#comment-118010</guid>

					<description><![CDATA[Please make sure these libraries are installed using PIP command -   openai ,  numpy ,  pandas , requests]]></description>
			<content:encoded><![CDATA[<p>Please make sure these libraries are installed using PIP command &#8211;   openai ,  numpy ,  pandas , requests</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yamini Machha		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/converting-salesforce-data-into-embeddings-with-openai-and-aws-lambda/#comment-118009</link>

		<dc:creator><![CDATA[Yamini Machha]]></dc:creator>
		<pubDate>Thu, 14 Dec 2023 23:55:04 +0000</pubDate>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=11191#comment-118009</guid>

					<description><![CDATA[Hi Sir, Thanks for the blogpost,I tried but getting this error --- 
cosine_similarity
    return np.dot(A, B) / (norm(A) * norm(B))
                           ~~~~~~~~^~~~~~~~~
TypeError: unsupported operand type(s) for *: &#039;rv_continuous_frozen&#039; and &#039;rv_continuous_frozen&#039;]]></description>
			<content:encoded><![CDATA[<p>Hi Sir, Thanks for the blogpost,I tried but getting this error &#8212;<br />
cosine_similarity<br />
    return np.dot(A, B) / (norm(A) * norm(B))<br />
                           ~~~~~~~~^~~~~~~~~<br />
TypeError: unsupported operand type(s) for *: &#8216;rv_continuous_frozen&#8217; and &#8216;rv_continuous_frozen&#8217;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.jitendrazaa.com @ 2026-04-17 05:40:35 by W3 Total Cache
-->