Category: News
function with multiple listeners freezing on R2024a. was working fine on R2022b
Hi,
I have created a function (with multiple embedded functions in the same .m file) that create a GUI to load a picture and add a "user defined" amount of line on it that the user can modify.
I don’t think i can share the full code but on the principle:
once the user has selected the figure, it gets put in an ax
the added curves are then saved as "children of the ax"
there are sliders button with listeners that are linked to those lines, through the list of children of the ax.
when the user select a curve in a drop-down list and move the associate slider, the selected line move on the graph.
the listeners are added in a loop as the code doesn’t know a priori how many lines the user would add.
I was quite proud of this code that was working exactly as intended on R2022b, when I coded it. I skipped entirely R2023 but I now installed R2024a and the code freezes when creating the first series of listeners. it does not issue any error mistake but I just hear my PC working very hard suddenly, with matlab using suddenly up to 20% of the CPU. I saw this thread
https://www.mathworks.com/matlabcentral/answers/287708-some-matlab-versions-crash-when-using-listener
regarding potentially the same issue but it was for R2015.
I tried as well to install R2023b and the code freezes as well. for comparison I use the exact same code with the same figure and the same amount of added line (20) on all three versions. this is what I get
R2022b: lines and listeners added in 6 sec. CPU usage max up to 25%
R2023b: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 16 % at the start, but steady at 12% until I kill the process.
R2024a: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 25 % at the start, but steady at 15% until I kill the process.
I tried as well with lower amount of line (5) and all three version worked. it was very fast for R2022b (<1sec) and took about 5 sec. for R2023b and R2024a.
My code is certainly not optimal. I was learning how to make a GUI while doing it and after the fact I saw how I could have make it better, but since it was working I did not bother…and of course now I don’t really "remember" all that I did back in 2022.
without seeing the code, would you be able to tell me what changed between R2022b and R2023b/R2024a that would make my code that much slowlier? would you have a quick fix?Hi,
I have created a function (with multiple embedded functions in the same .m file) that create a GUI to load a picture and add a "user defined" amount of line on it that the user can modify.
I don’t think i can share the full code but on the principle:
once the user has selected the figure, it gets put in an ax
the added curves are then saved as "children of the ax"
there are sliders button with listeners that are linked to those lines, through the list of children of the ax.
when the user select a curve in a drop-down list and move the associate slider, the selected line move on the graph.
the listeners are added in a loop as the code doesn’t know a priori how many lines the user would add.
I was quite proud of this code that was working exactly as intended on R2022b, when I coded it. I skipped entirely R2023 but I now installed R2024a and the code freezes when creating the first series of listeners. it does not issue any error mistake but I just hear my PC working very hard suddenly, with matlab using suddenly up to 20% of the CPU. I saw this thread
https://www.mathworks.com/matlabcentral/answers/287708-some-matlab-versions-crash-when-using-listener
regarding potentially the same issue but it was for R2015.
I tried as well to install R2023b and the code freezes as well. for comparison I use the exact same code with the same figure and the same amount of added line (20) on all three versions. this is what I get
R2022b: lines and listeners added in 6 sec. CPU usage max up to 25%
R2023b: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 16 % at the start, but steady at 12% until I kill the process.
R2024a: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 25 % at the start, but steady at 15% until I kill the process.
I tried as well with lower amount of line (5) and all three version worked. it was very fast for R2022b (<1sec) and took about 5 sec. for R2023b and R2024a.
My code is certainly not optimal. I was learning how to make a GUI while doing it and after the fact I saw how I could have make it better, but since it was working I did not bother…and of course now I don’t really "remember" all that I did back in 2022.
without seeing the code, would you be able to tell me what changed between R2022b and R2023b/R2024a that would make my code that much slowlier? would you have a quick fix? Hi,
I have created a function (with multiple embedded functions in the same .m file) that create a GUI to load a picture and add a "user defined" amount of line on it that the user can modify.
I don’t think i can share the full code but on the principle:
once the user has selected the figure, it gets put in an ax
the added curves are then saved as "children of the ax"
there are sliders button with listeners that are linked to those lines, through the list of children of the ax.
when the user select a curve in a drop-down list and move the associate slider, the selected line move on the graph.
the listeners are added in a loop as the code doesn’t know a priori how many lines the user would add.
I was quite proud of this code that was working exactly as intended on R2022b, when I coded it. I skipped entirely R2023 but I now installed R2024a and the code freezes when creating the first series of listeners. it does not issue any error mistake but I just hear my PC working very hard suddenly, with matlab using suddenly up to 20% of the CPU. I saw this thread
https://www.mathworks.com/matlabcentral/answers/287708-some-matlab-versions-crash-when-using-listener
regarding potentially the same issue but it was for R2015.
I tried as well to install R2023b and the code freezes as well. for comparison I use the exact same code with the same figure and the same amount of added line (20) on all three versions. this is what I get
R2022b: lines and listeners added in 6 sec. CPU usage max up to 25%
R2023b: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 16 % at the start, but steady at 12% until I kill the process.
R2024a: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 25 % at the start, but steady at 15% until I kill the process.
I tried as well with lower amount of line (5) and all three version worked. it was very fast for R2022b (<1sec) and took about 5 sec. for R2023b and R2024a.
My code is certainly not optimal. I was learning how to make a GUI while doing it and after the fact I saw how I could have make it better, but since it was working I did not bother…and of course now I don’t really "remember" all that I did back in 2022.
without seeing the code, would you be able to tell me what changed between R2022b and R2023b/R2024a that would make my code that much slowlier? would you have a quick fix? freezing code, addlisteners, r2023, r2024 MATLAB Answers — New Questions
How to convert this fplot to 3D plot view
syms z
t=0.2;
sc=0.6;
s1=z;
s2=2*(sqrt(t));
x=(s1./s2);
c5=exp((2*x*(sqrt(sc*t))));
c6=erfc((x*sqrt(sc))+(sqrt(t)));
c7=exp((-2*x*(sqrt(t*sc))));
c8=erfc((x*sqrt(sc))-(sqrt(t)));
q=((1/2)*((c5*c6)+(c7*c8)));
xlim([0 5]);
ylim([0 1]);
fplot(z,q)
hold on
legend ("sc=2.01","sc=","sc=0.6");
xlabel("η (Similarity parameter)");
ylabel("C (Concentration)");syms z
t=0.2;
sc=0.6;
s1=z;
s2=2*(sqrt(t));
x=(s1./s2);
c5=exp((2*x*(sqrt(sc*t))));
c6=erfc((x*sqrt(sc))+(sqrt(t)));
c7=exp((-2*x*(sqrt(t*sc))));
c8=erfc((x*sqrt(sc))-(sqrt(t)));
q=((1/2)*((c5*c6)+(c7*c8)));
xlim([0 5]);
ylim([0 1]);
fplot(z,q)
hold on
legend ("sc=2.01","sc=","sc=0.6");
xlabel("η (Similarity parameter)");
ylabel("C (Concentration)"); syms z
t=0.2;
sc=0.6;
s1=z;
s2=2*(sqrt(t));
x=(s1./s2);
c5=exp((2*x*(sqrt(sc*t))));
c6=erfc((x*sqrt(sc))+(sqrt(t)));
c7=exp((-2*x*(sqrt(t*sc))));
c8=erfc((x*sqrt(sc))-(sqrt(t)));
q=((1/2)*((c5*c6)+(c7*c8)));
xlim([0 5]);
ylim([0 1]);
fplot(z,q)
hold on
legend ("sc=2.01","sc=","sc=0.6");
xlabel("η (Similarity parameter)");
ylabel("C (Concentration)"); 3d plots, matlab function MATLAB Answers — New Questions
Microsoft teams screen share very slow and no audio during sharing screen
Hello experts
I am facing an issue with my LOQ, whenever I am sharing my screen on microsoft teams to do a presentation or show some visuals from an app, the audience is unable to hear me. In addition to that, the screen share has A VERY LOW FPS rate even when using the command ctrl+shift+t.
All drivers are updates, windows is updates, microsoft teams is updated and the gpu driver as well.
To troubleshoot, I have reset the graphics driver, reset windows, reset the laptop itself with no luck. Even ran the teams application with rtx4060 instead of intel UHD graphic card.
Please advise.
System specs:
i7-13620H
RAM: 32GB
Storage: 1TB SSD
GPU: RTX4060
Hello expertsI am facing an issue with my LOQ, whenever I am sharing my screen on microsoft teams to do a presentation or show some visuals from an app, the audience is unable to hear me. In addition to that, the screen share has A VERY LOW FPS rate even when using the command ctrl+shift+t.All drivers are updates, windows is updates, microsoft teams is updated and the gpu driver as well.To troubleshoot, I have reset the graphics driver, reset windows, reset the laptop itself with no luck. Even ran the teams application with rtx4060 instead of intel UHD graphic card. Please advise.System specs:i7-13620HRAM: 32GBStorage: 1TB SSDGPU: RTX4060 Read More
SQL Ssrver Query Optimisation
Hi everyone,
I am currently building a SQL report, but i need somebody to help me optimize my query.
The query is working fine and pulling data, only if a selected a specific product (one or two), But when i need to pull data without that filter, the query is taking more time to show results, and i am not getting any data pulled.
Here is my SQL Query :
WITH WeighingData AS (
SELECT
CASE TRANS_TYPE
WHEN 2 THEN ‘Dispatch’
WHEN 1 THEN ‘Receiving’
WHEN 0 THEN ‘Cancelled’
END AS Transaction_Type,
w.TIMESTAMP_1,
w.TIMESTAMP_2,
w.TICKETNO,
w.HAULIER,
w.IMAGE_1_1,
w.IMAGE_1_2,
w.IMAGE_2_1,
w.IMAGE_2_2,
w.OPERATOR_1 AS ‘Operator ID1’,
w.OPERATOR_2 AS ‘Operator ID2’,
xind1.FULL_NM AS ‘Operator1_Fullname’,
xind2.FULL_NM AS ‘Operator2_Fullname’,
w.PRODUCT,
w.NET,
w.VEHICLE_MANIFEST,
w.DESPATCH_ORDER,
w.WEIGHT_1,
w.WEIGHT_2,
w.BOL,
ISNULL(d.DRIVER_NAME, N”) + ISNULL(d.DRIVER_SURNAME, N”) AS Driver_Fullname,
v.LICENSEPLATE,
st1.TERMINAL AS WBG1,
st2.TERMINAL AS WBG2,
p.NAME,
ROW_NUMBER() OVER (PARTITION BY w.TICKETNO, w.VEHICLE_MANIFEST, w.DESPATCH_ORDER ORDER BY st1.TRANSIT_TIME DESC) AS RowNum
FROM
[Multiweigh].[Flexpoint].[WEIGHING] w
INNER JOIN Flexpoint.PRODUCT p ON p.CODE = w.PRODUCT
INNER JOIN Flexpoint.DRIVER d ON d.DRIVER_ID = w.DRIVER_ID
LEFT OUTER JOIN Flexpoint.VEHICLE v ON v.LICENSEPLATE = w.VEHICLE
LEFT JOIN Flexpoint.STAGING_TRANSIT st1 ON st1.PARAMETER_3 = w.VEHICLE_MANIFEST OR st1.PARAMETER_4 = w.DESPATCH_ORDER
LEFT JOIN Flexpoint.STAGING_TRANSIT st2 ON st2.PARAMETER_3 = w.VEHICLE_MANIFEST OR st2.PARAMETER_4 = w.DESPATCH_ORDER
LEFT JOIN Flexpoint.XINDIVIDUAL xind1 ON xind1.USERINDIV = w.OPERATOR_1
LEFT JOIN Flexpoint.XINDIVIDUAL xind2 ON xind2.USERINDIV = w.OPERATOR_2
INNER JOIN Flexpoint.XSTATION x ON x.STATION = w.STATION
WHERE
w.TIMESTAMP_1 BETWEEN ‘2024-08-04 00:00:00’ AND ‘2024-08-04 23:59:59’
AND w.PRODUCT IN (@Product_Name)
AND w.TICKETNO LIKE @Ticket_No
AND TRANS_TYPE IN (@Transaction_Type)
)
SELECT
*,
CONCAT(CAST([Operator ID1] AS NVARCHAR(50)), ‘ – ‘, [Operator1_Fullname]) AS Operator1_Info,
CONCAT(CAST([Operator ID2] AS NVARCHAR(50)), ‘ – ‘, [Operator2_Fullname]) AS Operator2_Info
FROM
WeighingData
WHERE
RowNum = 1
AND ([WBG1] LIKE ‘%weighb%’ OR [WBG2] LIKE ‘%weighb%’);
Hi everyone, I am currently building a SQL report, but i need somebody to help me optimize my query.The query is working fine and pulling data, only if a selected a specific product (one or two), But when i need to pull data without that filter, the query is taking more time to show results, and i am not getting any data pulled. Here is my SQL Query : WITH WeighingData AS ( SELECT CASE TRANS_TYPE WHEN 2 THEN ‘Dispatch’ WHEN 1 THEN ‘Receiving’ WHEN 0 THEN ‘Cancelled’ END AS Transaction_Type, w.TIMESTAMP_1, w.TIMESTAMP_2, w.TICKETNO, w.HAULIER, w.IMAGE_1_1, w.IMAGE_1_2, w.IMAGE_2_1, w.IMAGE_2_2, w.OPERATOR_1 AS ‘Operator ID1’, w.OPERATOR_2 AS ‘Operator ID2’, xind1.FULL_NM AS ‘Operator1_Fullname’, xind2.FULL_NM AS ‘Operator2_Fullname’, w.PRODUCT, w.NET, w.VEHICLE_MANIFEST, w.DESPATCH_ORDER, w.WEIGHT_1, w.WEIGHT_2, w.BOL, ISNULL(d.DRIVER_NAME, N”) + ISNULL(d.DRIVER_SURNAME, N”) AS Driver_Fullname, v.LICENSEPLATE, st1.TERMINAL AS WBG1, st2.TERMINAL AS WBG2, p.NAME, ROW_NUMBER() OVER (PARTITION BY w.TICKETNO, w.VEHICLE_MANIFEST, w.DESPATCH_ORDER ORDER BY st1.TRANSIT_TIME DESC) AS RowNum FROM [Multiweigh].[Flexpoint].[WEIGHING] w INNER JOIN Flexpoint.PRODUCT p ON p.CODE = w.PRODUCT INNER JOIN Flexpoint.DRIVER d ON d.DRIVER_ID = w.DRIVER_ID LEFT OUTER JOIN Flexpoint.VEHICLE v ON v.LICENSEPLATE = w.VEHICLE LEFT JOIN Flexpoint.STAGING_TRANSIT st1 ON st1.PARAMETER_3 = w.VEHICLE_MANIFEST OR st1.PARAMETER_4 = w.DESPATCH_ORDER LEFT JOIN Flexpoint.STAGING_TRANSIT st2 ON st2.PARAMETER_3 = w.VEHICLE_MANIFEST OR st2.PARAMETER_4 = w.DESPATCH_ORDER LEFT JOIN Flexpoint.XINDIVIDUAL xind1 ON xind1.USERINDIV = w.OPERATOR_1 LEFT JOIN Flexpoint.XINDIVIDUAL xind2 ON xind2.USERINDIV = w.OPERATOR_2 INNER JOIN Flexpoint.XSTATION x ON x.STATION = w.STATION WHERE w.TIMESTAMP_1 BETWEEN ‘2024-08-04 00:00:00’ AND ‘2024-08-04 23:59:59’ AND w.PRODUCT IN (@Product_Name) AND w.TICKETNO LIKE @Ticket_No AND TRANS_TYPE IN (@Transaction_Type))SELECT *, CONCAT(CAST([Operator ID1] AS NVARCHAR(50)), ‘ – ‘, [Operator1_Fullname]) AS Operator1_Info, CONCAT(CAST([Operator ID2] AS NVARCHAR(50)), ‘ – ‘, [Operator2_Fullname]) AS Operator2_InfoFROM WeighingDataWHERE RowNum = 1 AND ([WBG1] LIKE ‘%weighb%’ OR [WBG2] LIKE ‘%weighb%’); Read More
Exchange Online Powershell not connecting in scheduled Task script
Hello everyone,
I am having this issue where I can’t find any useful answer.
We are connecting to Exchange Online with certificate based authentication and it works fine when we run the script manually.
Running the script via scheduled task with the same user, we always receive the following error messages.
PS>TerminatingError(Get-ConnectionContext): “One or more errors occurred.”
PS>TerminatingError(): “An error occurred while sending the request.”
An error occurred while sending the request.
At C:Program FilesWindowsPowerShellModulesExchangeOnlineManagement3.5.0netFrameworkExchange
OnlineManagement.psm1:762 char:21
+ throw $_.Exception.InnerException;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], HttpRequestException
+ FullyQualifiedErrorId : An error occurred while sending the request.
This is the command we use to connect:
Connect-ExchangeOnline -AppId $AppId -CertificateThumbprint $CertificateThumbprint -Organization $Organization -ShowBanner:$false -loglevel all
Has anyone experienced this before?
ExchangeOnlineManagement Module is Version 3.5.0
Powershell Version is 5.1.14393.7155
Hello everyone, I am having this issue where I can’t find any useful answer.We are connecting to Exchange Online with certificate based authentication and it works fine when we run the script manually.Running the script via scheduled task with the same user, we always receive the following error messages. PS>TerminatingError(Get-ConnectionContext): “One or more errors occurred.”
PS>TerminatingError(): “An error occurred while sending the request.”
An error occurred while sending the request.
At C:Program FilesWindowsPowerShellModulesExchangeOnlineManagement3.5.0netFrameworkExchange
OnlineManagement.psm1:762 char:21
+ throw $_.Exception.InnerException;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], HttpRequestException
+ FullyQualifiedErrorId : An error occurred while sending the request. This is the command we use to connect: Connect-ExchangeOnline -AppId $AppId -CertificateThumbprint $CertificateThumbprint -Organization $Organization -ShowBanner:$false -loglevel all Has anyone experienced this before? ExchangeOnlineManagement Module is Version 3.5.0Powershell Version is 5.1.14393.7155 Read More
Subscribe to Azure Storage Blob Lifecycle Policy Events
The LifecyclePolicyCompleted event is generated when the actions defined by a lifecycle management policy are performed. Refer – Optimize costs by automatically managing the data lifecycle – Azure Blob Storage | Microsoft Learn
This article shares steps to subscribe to these events and help you track how much data moved, deleted or archived.
Step 1: Create Event Grid – System topic, which helps to subscribe to events published by Azure Services. Refer below:
Step 2: Go to the Event Grid System Topic created and create a new Event Subscription.
Step 3: Select Event Type Filter as “Lifecycle Policy Completed“
Step 4: Select Endpoint to receive events. For simplicity we are using Storage Queue.
Step 5: Assign the System Managed identity in the storage account IAM for the event grid with role of “Storage Queue Data Message Sender”, once role is assigned successfully, then go in the Event Subscription of the change the Managed Identity for Delivery to “System Assigned” and save.
Step 6: Go to the storage queue to see the events published.
For Azure Grid pricing refer Pricing – Event Grid | Microsoft Azure
Microsoft Tech Community – Latest Blogs –Read More
GraphRAG Costs Explained: What You Need to Know
GraphRAG represents an innovative approach to powering Retrieval-Augmented Generation (RAG) applications, enabling organizations to extract unprecedented value from their complex datasets. However, unlike the relatively straightforward process of embedding and vectorizing data that most organizations use, constructing a graph requires additional effort and cost. This article provides a practical example to help you estimate the costs associated with building your own graph.
For those seeking a quick overview, here is an example to help build a sense of the cost per document analyzed. You can find an approximate calculation method for estimating the costs of your own datasets later in this article.
It is worth noting that LLM costs continue to be significantly optimized, and fine-tuned models specialized for building graphs are already being developed. When assessing an emerging technology, it is important to consider what business value these new capabilities unlock, and not allow the cost at a point in time prevent you making the most of these opportunities.
Why Use GraphRAG?
Typical RAG systems excel at retrieving specific pieces of information, such as:
What wattage does this product require to operate?
What was the revenue for FY24?
How can I sign up for this service?
However, they struggle when it comes to answering questions that require a comprehensive understanding of an entire document or a set of documents:
What are the key themes of this report?
What are all the products currently being supported by my API gateway?
List all the contractors that have completed work at this manufacturing site and tell me what level of certification they have.
This limitation arises because traditional retrieval systems return only isolated chunks of information. In contrast, a knowledge graph captures the relationships between various entities, objects, and systems, thereby providing a holistic understanding of the documents in a memory-efficient manner.
In this article, we use the novel “The Wizard of Oz” as our reference text to explore the costs associated with GraphRAG. You can see the graph representation of the novel visualized below.
What are the major costs of GraphRAG?
1. Building the Graph
If you have data that contains significant metadata, it can be straightforward to build a graph- for example, social media websites are able to create graph networks by identifying the relationships between people based on who they interact with. Developing a graph for unstructured data such as a novel or other text documents is much more difficult.
There are two key elements that make up a graph:
Nodes: Key entities in the documents, such as characters, objects, and places (e.g. Dorothy, the main character, or Toto, her dog).
Edges: The relationships between these entities, such as the connection between Toto and Dorothy (friends, pet). The LLM also estimates the strength or relevance of this relationship as a numerical figure.
For both the nodes and edges, the LLM adds a summary and additional information, including references to the original text.
Building this list of nodes and edges is time-consuming, particularly for unstructured data where text must be analyzed to find these relationships. This is where the bulk of GraphRAG’s costs originate. Documents are analyzed in chunks, and nodes and edges are created through the clever use of Large Language Models (LLMs). The following prompt illustrates how few-shot prompting is used to progressively build a graph:
-Goal-
Given a text document that is potentially relevant to this activity, first identify all entities needed from the text in order to capture the information and ideas in the text.
Next, report all relationships among the identified entities.
-Steps-
1. Identify all entities. For each identified entity, extract the following information:
– entity_name: Name of the entity, capitalized
– entity_type: Suggest several labels or categories for the entity. The categories should not be specific, but should be as general as possible.
– entity_description: Comprehensive description of the entity’s attributes and activities
Format each entity as (“entity”{tuple_delimiter}<entity_name>{tuple_delimiter}<entity_type>{tuple_delimiter}<entity_description>
2. From the entities identified in step 1, identify all pairs of (source_entity, target_entity) that are *clearly related* to each other.
For each pair of related entities, extract the following information:
– source_entity: name of the source entity, as identified in step 1
– target_entity: name of the target entity, as identified in step 1
– relationship_description: explanation as to why you think the source entity and the target entity are related to each other
– relationship_strength: a numeric score indicating strength of the relationship between the source entity and target entity
Format each relationship as (“relationship”{tuple_delimiter}<source_entity>{tuple_delimiter}<target_entity>{tuple_delimiter}<relationship_description>{tuple_delimiter}<relationship_strength>)
3. Return output in English as a single list of all the entities and relationships identified in steps 1 and 2. Use **{record_delimiter}** as the list delimiter.
4. When finished, output {completion_delimiter}
-Examples-
######################
Example 1:
text:
It was very dark, and the wind howled horribly around her, but Dorothy
found she was riding quite easily. After the first few whirls around,
and one other time when the house tipped badly, she felt as if she were
being rocked gently, like a baby in a cradle.
Toto did not like it. He ran about the room, now here, now there,
barking loudly; but Dorothy sat quite still on the floor and waited to
see what would happen.
Once Toto got too near the open trap door, and fell in; and at first
the little girl thought she had lost him. But soon she saw one of his
ears sticking up through the hole, for the strong pressure of the air
was keeping him up so that he could not fall. She crept to the hole,
caught Toto by the ear, and dragged him into the room again, afterward
closing
————————
output:
(“entity”{tuple_delimiter}DOROTHY{tuple_delimiter}CHARACTER, PERSON{tuple_delimiter}Dorothy is a character who experiences a dark and windy environment, feels as if being rocked gently, and actively participates in rescuing Toto)
{record_delimiter}
(“entity”{tuple_delimiter}TOTO{tuple_delimiter}CHARACTER, ANIMAL{tuple_delimiter}Toto is Dorothy’s dog who dislikes the situation, runs around barking, and accidentally falls into a trap door but is saved by Dorothy)
{record_delimiter}
(“entity”{tuple_delimiter}TRAP DOOR{tuple_delimiter}OBJECT{tuple_delimiter}The trap door is an opening through which Toto falls, but the air pressure prevents him from falling completely)
{record_delimiter}
(“relationship”{tuple_delimiter}DOROTHY{tuple_delimiter}TOTO{tuple_delimiter}Dorothy rescues Toto from the trap door, showing a caring relationship{tuple_delimiter}9)
{record_delimiter}
(“relationship”{tuple_delimiter}TOTO{tuple_delimiter}TRAP DOOR{tuple_delimiter}Toto falls into the trap door, which is a pivotal moment for his character in this scene{tuple_delimiter}7)
{record_delimiter}
(“relationship”{tuple_delimiter}DOROTHY{tuple_delimiter}TRAP DOOR{tuple_delimiter}Dorothy interacts with the trap door to rescue Toto, showing her proactive nature{tuple_delimiter}8)
{completion_delimiter}
#############################
-Real Data-
######################
text: {input_text}
######################
output:
This process is repeated for the entire body of documents, and these LLM calls are what drives the majority of the cost.
For comparison, embedding documents for use with typical RAG patterns is relatively inexpensive. Vectorizing the entire text of the Wizard of Oz cost only $0.0056 USD, which is negligible in comparison with the costs of building the graph.
2. Hosting & Inference Costs
Inference costs are not a major focus of this article, as the difference in prompt and inference tokens between GraphRAG and typical RAG applications is highly dependent on the scenario. Either one may be more expensive than the other, however the profile of token usage is relatively similar.
Hosting costs depend on the technology used. For typical RAG applications, this is the vector database. For GraphRAG, the hosting methods are still evolving, so these costs have not been considered.
Cost breakdown
Step 1: Token consumption for building the graph
In this step, the document was processed using the GraphRAG solution accelerator. The total number of tokens consumed was then measured once the process completed.
Step 2: Cost calculation for building the graph
Next, the cost of these prompt and completion tokens was calculated, for three different models. The GraphRAG paper used GPT-4-Turbo, however new, lower cost models have since been released (GPT-4o and GPT-4o mini).
Step 3: Token consumption for querying the graph
There are two ways of querying GraphRAG- a local search, which is a narrower search best suited to targeted queries, and global searches, which search across the entire graph. For clarity, these costs include the cost of the search and the cost of the LLM to actually answer the user’s question.
Both queries took around 20-24 seconds. There is a method for streaming the results, although the initial retrieval step takes ~10-15 seconds, which must be completed before streaming is possible.
Step 4: Cost calculation for querying the graph
The cost for the two types of queries can then be calculated:
Step 5: Estimating the cost of other sets of documents
A range of quick references are included, to help build an intuition of the general cost of building a graph. Use care when leveraging these insights- this is intended as a reference only and is no substitute for benchmarking the costs on a small sample of your own documents.
It is important to note:
Proper benchmarking was not conducted in this work, to compare the performance of the different models.
Costs change frequently, and these costs only represent the cost at time of writing.
Dedicated models are anticipated to further reduce costs.
Parameters and window settings can significantly affect costs (by many multiples). These results were averaged across two experiments, but a proper analysis across a variety of use cases and parameter settings would be required to form a true calculation methodology. These results are only included as a very rough starting point, to help build an intuition of GraphRAG costs, and should not be used to size business cases.
The word count is convenient for quick estimates, but for proper sizing analyses, you should convert your word counts to tokens using online tools or code.
The per word or per token cost is extremely useful, as you can use it as a rough guide when estimating the cost of your dataset.
For example:
Word count for your set of documents: e.g. 30,000 words
Model chosen: GPT-4o-mini
Cost per word: $0.0000113 (from table above)
Cost: $0.0000113 * 30,000 = $0.34 USD to process your documents.
This could similarly be estimated using the token count of the document: 38,371 tokens * 0.0000088 = $0.34USD.
Value is What Matters
While cost is a critical factor, it is essential to evaluate it against the value that the system delivers. Consider the time it takes for a person to read through thousands of pages of enterprise documents and become intimately familiar with your organization’s processes and procedures. This level of deep knowledge can now be made available to your entire organization, in seconds. Traditionally, building a graph has been an expensive endeavor, often rendering it unfeasible for many organizations. GraphRAG offers a significant cost reduction compared to manually designing and building a graph, allowing organizations to realize value from their data that was previously locked away.
Future Trajectory of GraphRAG Costs
Research is ongoing to identify ways of further reducing the cost of implementing RAG over graph data structures. One key area of research combines traditional NLP techniques with new techniques to develop graphs at a significantly reduced cost, rather than relying solely on LLMs to generate every entity and relationship. A second focus area is training more specialized, smaller language models that are fine-tuned for graph generation which will further reduce costs and improve performance. In this article, GPT-4-Turbo was used with the chunking size set to the default of 1,200. In other work, it has been noted that by reducing the chunking size to 600, GPT-4o-mini is able to achieve similar performance to GPT-4-Turbo, for a fraction of the cost.
Summary
GraphRAG offers a transformative approach to powering RAG applications, enabling organizations to unlock new value from their data. While the costs associated with building a graph are higher than traditional embedding methods, the value delivered can far outweigh these expenses. As technology advances and new models emerge, the costs of GraphRAG are expected to decrease, making it an even more viable solution for organizations looking to get the most out of their data. The GraphRAG solution accelerator makes it easy to get started, benchmark the costs of your own dataset, and start implementing this emerging technology in your own applications!
Thank you to Jonathan Larson, Tim Meyers, and Josh Bradley for their invaluable feedback and review of this article.
Microsoft Tech Community – Latest Blogs –Read More
errors: Point Cloud Classification Using PointNet Deep Learning
‘modelGradients’ :
Generate Synthetic Signals Using Conditional GAN
Model-Based Reinforcement Learning Using Custom Training Loop
error: deep.internal.dlfeval (Line 17)
[varargout{1:nargout}] = fun(x{:});
error: deep.internal.dlfevalWithNestingCheck (Line 19)
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
error: dlfeval (Line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
error:
[gradients, loss, state, acc] = dlfeval(@modelGradients,XTrain,YTrain,parameters,state);’modelGradients’ :
Generate Synthetic Signals Using Conditional GAN
Model-Based Reinforcement Learning Using Custom Training Loop
error: deep.internal.dlfeval (Line 17)
[varargout{1:nargout}] = fun(x{:});
error: deep.internal.dlfevalWithNestingCheck (Line 19)
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
error: dlfeval (Line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
error:
[gradients, loss, state, acc] = dlfeval(@modelGradients,XTrain,YTrain,parameters,state); ‘modelGradients’ :
Generate Synthetic Signals Using Conditional GAN
Model-Based Reinforcement Learning Using Custom Training Loop
error: deep.internal.dlfeval (Line 17)
[varargout{1:nargout}] = fun(x{:});
error: deep.internal.dlfevalWithNestingCheck (Line 19)
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
error: dlfeval (Line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
error:
[gradients, loss, state, acc] = dlfeval(@modelGradients,XTrain,YTrain,parameters,state); pointnet MATLAB Answers — New Questions
Confusion with excel formula
The formula seems correct to me. Why is it not working? I request you to correct me.
The formula seems correct to me. Why is it not working? I request you to correct me. Read More
Azure Web App Easy Auth using Reverse Proxy
My organization manages one single endpoint which must be used to expose web application;
e.g.
We deployed an app in az web apps with Azure AD Easy Auth. (not accesible from the internet and no custom domain).
https://app-one.azurewebsites.net
Our app registration has this callback:
https://contoso.com/app-one/.auth/login/aad/callback
When i try to open any the app using https://contoso.com/app-one/, the browser recirects to Azure Login page, but it redirects back to https://app-one.azurewebsites.net., instead of going to the public website https://contoso.com/app-one/.
Our reverse proxy user Azure APIM.
Question is: how can i make Azure Web App to redirect to public endpoint instead of the azurewebsite endpoint?
Thanks.
My organization manages one single endpoint which must be used to expose web application; e.g.https://contoso.com/app-one/ We deployed an app in az web apps with Azure AD Easy Auth. (not accesible from the internet and no custom domain).https://app-one.azurewebsites.net Our app registration has this callback:https://contoso.com/app-one/.auth/login/aad/callback When i try to open any the app using https://contoso.com/app-one/, the browser recirects to Azure Login page, but it redirects back to https://app-one.azurewebsites.net., instead of going to the public website https://contoso.com/app-one/. Our reverse proxy user Azure APIM. Question is: how can i make Azure Web App to redirect to public endpoint instead of the azurewebsite endpoint? Thanks. Read More
Formula based on value on another column
Hello – I am trying to modify this formula to apply the calculation for all except where the value in “Job Type” column equals Officer. When the job type is Officer, the multiplication should be by 1.5 instead of 2.0. The other numbers such as 11, 12, etc represent columns, I just shortened them for the purpose of this example.
2.0*sum(11,12)+sum(14,15)/100*13+sum(14,15)/100*2.0*sum(11,12)+2.0*18+sum(13,16,17,19,20,21)
Hello – I am trying to modify this formula to apply the calculation for all except where the value in “Job Type” column equals Officer. When the job type is Officer, the multiplication should be by 1.5 instead of 2.0. The other numbers such as 11, 12, etc represent columns, I just shortened them for the purpose of this example. 2.0*sum(11,12)+sum(14,15)/100*13+sum(14,15)/100*2.0*sum(11,12)+2.0*18+sum(13,16,17,19,20,21) Read More
Setting up Custom Shortcut for Wrap Text
Hi, I have been working on a project that require a lengthy text on each cell and I have been moving my hand back and forth for the mouse and it doesn’t provide that much of convenience. Is there any way that I can setup the Keyboard Shortcut for Wrap Text and or is there one that I don’t know.
Thanks in advance guys!
Hi, I have been working on a project that require a lengthy text on each cell and I have been moving my hand back and forth for the mouse and it doesn’t provide that much of convenience. Is there any way that I can setup the Keyboard Shortcut for Wrap Text and or is there one that I don’t know. Thanks in advance guys! Read More
formula to Check if cell value matches with Dynamic Row Number.
I have Two Data Sheets”Sheet 1 (Raw Departures)” and “Sheet 2 (Raw Arrivals)” Sheet 1 (Raw Departures) Sheet 2 (Raw Arrivals) GuestSite# Guest NameSite# Match Site Row #. Sheet 1 Rrookie, Dan3 Bell, Michael Steven74 n/a Criss, Leon5 Brown, Beth18 n/a David, Clyde129 Brown, Greg64 n/a Evant, Tim64 Celino, Darrell153 n/a Smith, Jack63 Cordova, Edgar124 n/a Ham, Steve151 Land, Danica37 20Site Does not Match Hakins, Sam39 David, Clyde129 13Matched Site# Hookins, Shilo18 Davis, Tina107 n/a Kesslerl, Mikdew131 Evant, Tim121 14Matched Site# Land, Danica133 Hookins, Shilo18 18Matched Site# Using a Match() formula I have detected that “David, Clyde s in both sheets and the site number on Sheet 1 is in row 13. I now need to know if the site number is the same for both sheets; if “True” populate G12 with “Extended Stay” IF “FALSE” populate G12 with ” Moved to New Site” How can I dynamically change the row # in a formula? Something like “= If(“Sheet 1″ Column B, row# (based on G”X”,”Extended Stay”,”Moved to New Site”” I need to change the row# based on the Row found in the Match() Any help is appreciated.
I have Two Data Sheets”Sheet 1 (Raw Departures)” and “Sheet 2 (Raw Arrivals)” Sheet 1 (Raw Departures) Sheet 2 (Raw Arrivals) GuestSite# Guest NameSite# Match Site Row #. Sheet 1 Rrookie, Dan3 Bell, Michael Steven74 n/a Criss, Leon5 Brown, Beth18 n/a David, Clyde129 Brown, Greg64 n/a Evant, Tim64 Celino, Darrell153 n/a Smith, Jack63 Cordova, Edgar124 n/a Ham, Steve151 Land, Danica37 20Site Does not Match Hakins, Sam39 David, Clyde129 13Matched Site# Hookins, Shilo18 Davis, Tina107 n/a Kesslerl, Mikdew131 Evant, Tim121 14Matched Site# Land, Danica133 Hookins, Shilo18 18Matched Site# Using a Match() formula I have detected that “David, Clyde s in both sheets and the site number on Sheet 1 is in row 13. I now need to know if the site number is the same for both sheets; if “True” populate G12 with “Extended Stay” IF “FALSE” populate G12 with ” Moved to New Site” How can I dynamically change the row # in a formula? Something like “= If(“Sheet 1″ Column B, row# (based on G”X”,”Extended Stay”,”Moved to New Site”” I need to change the row# based on the Row found in the Match() Any help is appreciated. Read More
Regarding the plant creation in simulink.
How to create the general plant or custom plant to connect the ouputs from neural network predictive controller??How to create the general plant or custom plant to connect the ouputs from neural network predictive controller?? How to create the general plant or custom plant to connect the ouputs from neural network predictive controller?? plant, neural network predictive controller MATLAB Answers — New Questions
how to open .mhd file
DEAR ALL,
Anyone know how to open this image as attached. the file format is .mhdDEAR ALL,
Anyone know how to open this image as attached. the file format is .mhd DEAR ALL,
Anyone know how to open this image as attached. the file format is .mhd image processing, image analysis, image acquisition, digital image processing MATLAB Answers — New Questions
Signing into Microsoft
I’m trying to link my Microsoft account to my windows account on my laptop but it keeps asking me for a pin number but I literally can’t change the pin. It keeps sending me in circles. I can’t sign in but it tells me to sign in and go to accounts and sign in preferences to change my pin and I can’t do that.
I’m trying to link my Microsoft account to my windows account on my laptop but it keeps asking me for a pin number but I literally can’t change the pin. It keeps sending me in circles. I can’t sign in but it tells me to sign in and go to accounts and sign in preferences to change my pin and I can’t do that. Read More
Any plans to support Teams Chat interop outside meetings?
Hi,
I’m trying to build an integration between our app users chat (using ACS chat threads) and Teams threads to integrate external customers to our employee’s, but so far I understood, this is not possible.
Any workarounds or plans to add support to this scenario?
Hi, I’m trying to build an integration between our app users chat (using ACS chat threads) and Teams threads to integrate external customers to our employee’s, but so far I understood, this is not possible. Any workarounds or plans to add support to this scenario? Read More
One Drive Frozen
I have recovered access to one Drive and it says it is frozen, I click on upgrade and says I have a subscription.
I seem to be in a loop where my one Drive cannot be accessed.
Please help
I have recovered access to one Drive and it says it is frozen, I click on upgrade and says I have a subscription. I seem to be in a loop where my one Drive cannot be accessed. Please help Read More
Hand Gestures not working on HoloLens 2
Hi folks,
I created an MR application on HoloLens 2 and was working fine. One day, the device went to sleep when the application was running and when i turned on the device again, the hand gestures (scaling, positioning and rotating) are not working at all. And also, the issue occurred on every app i made with Unity before. I did factory reset on the device and even then its not solved. I have two HoloLens with me and both of them are having this hand gestures issue now.
I’m in a desperate situation. Please help me out with a solution for this…
Hi folks,I created an MR application on HoloLens 2 and was working fine. One day, the device went to sleep when the application was running and when i turned on the device again, the hand gestures (scaling, positioning and rotating) are not working at all. And also, the issue occurred on every app i made with Unity before. I did factory reset on the device and even then its not solved. I have two HoloLens with me and both of them are having this hand gestures issue now. I’m in a desperate situation. Please help me out with a solution for this… Read More
Defender for Endpoint – Viewing Alerts and Recommended Config Profile for Linuc
Hi
We have a fleet of around 1000 RHEL 7.2 systems that we wish to onboard to Microsoft Defender. There are a mix of DEV, Pre-Prod, PROD and run Web, DB + enterprise Apps for the business. We want to ensure that we can simply onboard them with least business disruption, so thinking to start with Anti-virus in “Passive” mode as described here–> https://learn.microsoft.com/en-us/defender-endpoint/linux-preferences#enforcement-level-for-antivirus-engine
Want to clarify the following:
If we on board these devices with AV set to “Passive”, the AV will catch the threats / malicious actions, but will not take any action – is that correct?When we publish a Linux configuration profile using to Linux systems that’s detailed here–> https://learn.microsoft.com/en-us/defender-endpoint/linux-preferences and if they have the AV set to “passive” mode, will they start reporting the alerts raised by AV component to Defender portal? Is this handled by EDR?What’s the significance of this particular setting “Report AV Suspicious Events to EDR“. Does this setting enable/disable the raised alerts for Linux endpoints to be reported to Defender portal? If yes, is there a way to filter this telemetry just for Linux systems?Is it fair to say that reviewing this telemetry provides enough (or all) the information to plan what configuration profile for Linux (for example, what files/paths/actions are currently raising alerts, so we can review them and create appropriate exceptions)?Is there any recommendation from Microsoft around safe / good start when planning the configuration profile for Linux systems to ensure minimum business disruption?
Thanks
Taranjeet Singh
HiWe have a fleet of around 1000 RHEL 7.2 systems that we wish to onboard to Microsoft Defender. There are a mix of DEV, Pre-Prod, PROD and run Web, DB + enterprise Apps for the business. We want to ensure that we can simply onboard them with least business disruption, so thinking to start with Anti-virus in “Passive” mode as described here–> https://learn.microsoft.com/en-us/defender-endpoint/linux-preferences#enforcement-level-for-antivirus-engine Want to clarify the following:If we on board these devices with AV set to “Passive”, the AV will catch the threats / malicious actions, but will not take any action – is that correct?When we publish a Linux configuration profile using to Linux systems that’s detailed here–> https://learn.microsoft.com/en-us/defender-endpoint/linux-preferences and if they have the AV set to “passive” mode, will they start reporting the alerts raised by AV component to Defender portal? Is this handled by EDR?What’s the significance of this particular setting “Report AV Suspicious Events to EDR”. Does this setting enable/disable the raised alerts for Linux endpoints to be reported to Defender portal? If yes, is there a way to filter this telemetry just for Linux systems?Is it fair to say that reviewing this telemetry provides enough (or all) the information to plan what configuration profile for Linux (for example, what files/paths/actions are currently raising alerts, so we can review them and create appropriate exceptions)?Is there any recommendation from Microsoft around safe / good start when planning the configuration profile for Linux systems to ensure minimum business disruption? ThanksTaranjeet Singh Read More