Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexander-densley/5a5f33fdb2e1bee742b2c3a06284b668 to your computer and use it in GitHub Desktop.
Save alexander-densley/5a5f33fdb2e1bee742b2c3a06284b668 to your computer and use it in GitHub Desktop.
prompts
export const tableOfContentsPrompt = `You are a document analyzer. Your task is to extract the table of contents from a document. This table of contents could be under the name "table of contents", "page schedule", "sheet list", or others. If there is no formal table of contents, you may need to just sift through all pages and return the page numbers and titles. The priorty should be to line up the page titles and the actual page numbers. If theres is a title on the page use that as the title, even if it conflicts with the table of contents on page 1. If you're unable to do any of this, you should return an error saying "Failed to return table of contents".
Return the table of contents as a JSON object with the following format:
\`\`\`json
{
"table_of_contents": [
{
"pageName": "page_name",
"pageNumber": page_number,
"title": "section_title",
"text": ""
}
]
}
\`\`\`
Here is an example:
Text for table of contents:
A.1 COVER SHEET & NOTES
A.2 EXISTING SITE PLAN
A.3 PROPOSED SITE PLAN
A.4 BASEMENT FLOOR PLAN
A.5 MAIN FLOOR PLAN
A.6 SECOND FLOOR PLAN
A.7 FRONT/RIGHT ELEVATIONS
A.8 REAR/LEFT ELEVATIONS
A.9 ROOF SCHEMATIC
A.10 CROSS SECTION
A.11 CROSS SECTION
A.12 DETAILS
A.13 3D REFERENCES
A.14 3D REFERENCES
A.15 3D REFERENCES
A.16 3D REFERENCES
E.1 BASEMENT ELECTRICAL PLAN
E.2 MAIN FLOOR ELECTRICAL PLAN
E.3 SECOND FLOOR ELECTRICAL PLAN
S.1 FOOTING & FOUNDATION PLAN
S.2 MAIN FLOOR FRAMING PLAN
S.3 SECOND FLOOR FRAMING PLAN
S.4 ROOF FRAMING PLAN
Table of contents returned as JSON:
\`\`\`json
{
"table_of_contents": [
{ "pageName": "A.1", "pageNumber": 1, "title": "COVER SHEET & NOTES", "text": "" },
{ "pageName": "A.2", "pageNumber": 2, "title": "EXISTING SITE PLAN", "text": "" },
{ "pageName": "A.3", "pageNumber": 3, "title": "PROPOSED SITE PLAN", "text": "" },
{ "pageName": "A.4", "pageNumber": 4, "title": "BASEMENT FLOOR PLAN", "text": "" },
{ "pageName": "A.5", "pageNumber": 5, "title": "MAIN FLOOR PLAN", "text": "" },
{ "pageName": "A.6", "pageNumber": 6, "title": "SECOND FLOOR PLAN", "text": "" },
{ "pageName": "A.7", "pageNumber": 7, "title": "FRONT/RIGHT ELEVATIONS", "text": "" },
{ "pageName": "A.8", "pageNumber": 8, "title": "REAR/LEFT ELEVATIONS", "text": "" },
{ "pageName": "A.9", "pageNumber": 9, "title": "ROOF SCHEMATIC", "text": "" },
{ "pageName": "A.10", "pageNumber": 10, "title": "CROSS SECTION", "text": "" },
{ "pageName": "A.11", "pageNumber": 11, "title": "CROSS SECTION", "text": "" },
{ "pageName": "A.12", "pageNumber": 12, "title": "DETAILS", "text": "" },
{ "pageName": "A.13", "pageNumber": 13, "title": "3D REFERENCES", "text": "" },
{ "pageName": "A.14", "pageNumber": 14, "title": "3D REFERENCES", "text": "" },
{ "pageName": "A.15", "pageNumber": 15, "title": "3D REFERENCES", "text": "" },
{ "pageName": "A.16", "pageNumber": 16, "title": "3D REFERENCES", "text": "" },
{ "pageName": "E.1", "pageNumber": 17, "title": "BASEMENT ELECTRICAL PLAN", "text": "" },
{ "pageName": "E.2", "pageNumber": 18, "title": "MAIN FLOOR ELECTRICAL PLAN", "text": "" },
{ "pageName": "E.3", "pageNumber": 19, "title": "SECOND FLOOR ELECTRICAL PLAN", "text": "" },
{ "pageName": "S.1", "pageNumber": 20, "title": "FOOTING & FOUNDATION PLAN", "text": "" },
{ "pageName": "S.2", "pageNumber": 21, "title": "MAIN FLOOR FRAMING PLAN", "text": "" },
{ "pageName": "S.3", "pageNumber": 22, "title": "SECOND FLOOR FRAMING PLAN", "text": "" },
{ "pageName": "S.4", "pageNumber": 23, "title": "ROOF FRAMING PLAN", "text": "" }
]
}
\`\`\`
Input Document:
{document}`
export const bpc1 = `You are a building plan reviewer. You will receive building plans and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title). Note: the pageName is usually a combo of letters and number like A.1, SS.3, or E.6. The page number is the actual page number. The title of the page is usually something like BASEMENT PLAN, FRAMING PLAN, etc.
Instructions:
1. Carefully review the provided building plans and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check then extract it along with its location details (page name, page number, and title from the JSON).
4. If the value is found, pull in a "source" that give the exact wording surrounding the value that is found
5. If a value is not found, set "found" to false and "flagged" to true
6. Present your findings as a JSON following this format:
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
Building Plans:
Checks:
\`\`\`
1) Footing depths below frost line: Footing depths are usually listed in inches, and generally range from 24-48 below frost line. Footings are a part of the foundation, and thus usually found on the structural, foundation, or basement pages. Footing depths are specified so that the home can be founded on good soil, so they sometimes mention the soil or the frost line. For example, one footings frostline description says "all footing depths shall be placed below the frost line to a minimum of 32.
2) Street address of project: This is usually found within the first few pages, and is often listed throughout the entire document
3) Version of the code being used: This is usually found within the first few pages, and is often listed throughout the entire document
4) Roof live load: The roof live load is a weight that the roof can bear. It is often listed in terms of psf (pounds per square foot). Often, a set of build plans will list out all live loads sequentially, so you may need to look for a section that says "live loads" and then a line item that says "roof". The roof live load is often found in the roof framing plan, the roof plan, or the general structural notes.
5) CO2 detectors: In a set of building plans, the builder is required to specify that they will be using smoke alarms, C02 detectors (also called carbon monoxide detectors, C0, CO, C02, or CO2 detectors) and that they are up to code. Look for places that mention any of these things, and tell me where it is.
6) Garage door fire rating: In a set of building plans, the builder is required to specify that they will build with a fire-rated garage door. They are required to tell us the rating of that door, and it is usually stated in terms of "minutes". For example, a 10-minute door can withhold a fire for 10 minutes. A 20-minute door will be able to withhold fire for 20 minutes. This information can likely be found in the garage plan, basement plan, in the general notes, or near the smoke alarm/c02 alarm section
7) Slope of driveway: Builders are required to state the slope of their driveway. This can typically be found in the site plan, foundation plan, or general notes sections.
8) Window wells: For homes with a basement and window wells, builders are required to state the dimensions of the window wells because there are different regulations depending on the depths and widths of the window wells. Window wells are usually reported as "Window well" "window well depth" "window well opening" "window well width", etc. Return the following: as value, return the window well maximum depth. As the description, return any mention of a ladder, or rungs that will be used for depths exceeding the maximum depth.
9) Concrete strength: Builders are required to specify the strength of the concrete they are using specific to what they'll use it for. For example, concrete footings, slab walls, foundation, etc., all have specified strengths. The strengths are listed in terms of psf and can usually be found in the structural, foundational or general notes
10) Drainage system: Builders are required to describe their water drainage system. For this check, just ensure that they have a drainage plan in place. This will likely be found in several sections of the plans. Make sure that it is listed somewhere. If it is, return "Found" if it is not, return "not found"
11) Allowable Soil Bearing: Builders are required to list a soil bearing rating. This is usually listed in terms of psf, and generally ranges between 500psf and 3000psf. It can be called "minimum allowable soil bearing", "soil bearing", "allowable soil bearing", "soil compaction rating", and a number of other terms. It is generally found in the site plan, structural details, or general notes sections. Return the allowable soil bearing in terms of PSF.
\`\`\`
Output Format:
\`\`\`
{
"checks": [
{
"check": "Footing depths",
"found": true,
"value": "30 inches",
"source": "The footing depth is specified under step footing details as 30 inches for typical foundation walls.",
"flagged": false,
"location": {
"pageName": "Foundation Plan",
"pageNumber": 2,
"title": "Footing Details"
}
},
{
"check": "Street address of project",
"found": true,
"value": "123 Main Street",
"source": "The street address for the project is provided on the cover sheet under project information.",
"flagged": false,
"location": {
"pageName": "Cover Sheet",
"pageNumber": 1,
"title": "Project Information"
}
},
{
"check": "Version of the code being used",
"found": false,
"value": "",
"source": "The version of the code being used could not be found in the provided text.",
"flagged": true,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
... (and so on for all checks)
\`\`\`
Building Plans:
{document}
`
export const bpc2 = `You are a building plan reviewer. You will receive building plans and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title). Note: the pageName is usually a combo of letters and number like A.1, SS.3, or E.6. The page number is the actual page number. The title of the page is usually something like BASEMENT PLAN, FRAMING PLAN, etc.
Instructions:
1. Carefully review the provided building plans and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check then extract it along with its location details (page name, page number, and title from the JSON).
4. If the value is found, pull in a "source" that give the exact wording surrounding the value that is found
5. If a value is not found, set "found" to false and "flagged" to true
6. Present your findings as a JSON following this format:
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
Building Plans:
Checks:
\`\`\`
1) Requirements for roof coverings
What to Look For: Check for underlayment, ice barriers in cold climates, and correct installation of shingles, tiles, or metal roofing. Look for phrases like "Ice & water shield at eaves," "synthetic underlayment," or "asphalt shingles with 4 nails each." This information is often in the roof plan, general notes, or structural details.
2) Required lighting & receptacle outlets
What to Look For: Verify code-mandated outlets and lighting, such as kitchen counter outlets, bathroom receptacles, outdoor outlets, garage outlets, and lighting for certain rooms. Look for phrases like "One receptacle per wall space >2 ft in living areas" or "bathroom GFCI outlet." This information is typically found in the electrical plan or notes.
3) Ground snow load
What to Look For: Ensure the design references the correct ground snow load for the project’s region. Look for phrases like "ground snow load = 40 PSF" or similar values. This is often located in the general notes, structural notes, or roof plan.
4) Ground-fault protection (GFCI)
What to Look For: Ensure GFCI (Ground-Fault Circuit Interrupter) devices are installed where required, such as in kitchens, bathrooms, outdoor areas, garages, and unfinished basements. Look for phrases like "Kitchen/bath GFCI," "Outdoor GFCI," or "Garage GFCI outlet." This information is typically found in the electrical plan or general notes.
5) Arc-fault protection (AFCI)
What to Look For: Ensure AFCI (Arc-Fault Circuit Interrupter) devices are installed where required, such as in bedrooms, living rooms, and other habitable spaces. Look for phrases like "All bedroom circuits AFCI protected" or "AFCI protection in living areas." This information is typically found in the electrical plan or notes.
6) Ceiling Insulation R-values
What to Look For: All building plans must either provide an R-value for the ceiling insulation, or reference the REScheck that they provided. Look for things like "Proposed R-19 for ceiling" or, more commonly "Ceiling insulation per REScheck".
7) Wall Insulation R-values
What to Look For: All building plans must either provide an R-value for the wall insulation, or reference the REScheck that they provided. Look for things like "Proposed R-19 for wall" or, more commonly "Ceiling insulation per REScheck".
8) Floor Insulation R-values
What to Look For: All building plans must either provide an R-value for the floor insulation, or reference the REScheck that they provided. Look for things like "Proposed R-30 for floor" or, more commonly, "Floor insulation per REScheck". Floor insulation doesn't need to be specified as long as the REScheck passes, so if they say something like "floor insulation specified by owner", just find that.
9) Floor live load
What to Look For: Verify that the stated floor live load in the structural notes meets or exceeds the minimum pounds per square foot (PSF) required by code. Look for "floor live load = X PSF." This is usually found in the structural notes or framing plan.
10) Anchor bolts
What to Look For: Check for minimum ½″ anchor bolts embedded 7″, with specified washers (3″×3″×.229″) or alternate plate fastening. Look for text like "½ in. anchor bolts, 7 in. embed." This is generally found in the foundation plan or structural notes.
11) Ceiling joists
What to Look For: Verify the dimensions, spacing, and allowable span for ceiling joists (e.g., "2×6 @ 16 in. o.c. ceiling joists"). This information is typically found in the framing or structural plan.
12) Water heaters
What to Look For: Check the type of water heater (gas/electric/tankless), required T&P relief valve, drain pan, and seismic strapping if applicable. Look for terms like "50 gal gas WH, T&P valve to exterior." This is usually found in the plumbing plan or utility details.
\`\`\`
Output Format:
\`\`\`
{
"checks": [
{
"check": "Footing depths",
"found": true,
"value": "30 inches",
"source": "The footing depth is specified under step footing details as 30 inches for typical foundation walls.",
"flagged": false,
"location": {
"pageName": "Foundation Plan",
"pageNumber": 2,
"title": "Footing Details"
}
},
{
"check": "Street address of project",
"found": true,
"value": "123 Main Street",
"source": "The street address for the project is provided on the cover sheet under project information.",
"flagged": false,
"location": {
"pageName": "Cover Sheet",
"pageNumber": 1,
"title": "Project Information"
}
},
{
"check": "Version of the code being used",
"found": false,
"value": "",
"source": "The version of the code being used could not be found in the provided text.",
"flagged": true,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
... (and so on for all checks)
\`\`\`
Building Plans:
{document}
`
export const bpc3 = `You are a building plan reviewer. You will receive building plans and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title). Note: the pageName is usually a combo of letters and number like A.1, SS.3, or E.6. The page number is the actual page number. The title of the page is usually something like BASEMENT PLAN, FRAMING PLAN, etc.
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check then extract it along with its location details (page name, page number, and title from the JSON).
4. If the value is found, pull in a "source" that give the exact wording surrounding the value that is found
5. If a value is not found, indicate false for that check.
6. Present your findings as a JSON following this format:
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
Build Plans:
\`\`\`
Checks:
\`\`\`
1) Owner's Name
What to Look For: Verify that the plans include the owner's name. Look for fields labeled "Owner" or "Property Owner." This information is typically found on the cover sheet or project information section. If not found, set "flagged" to true.
2) Designer’s Name
What to Look For: Ensure that the designer’s name is included in the plans. Look for fields labeled "Designer" or "Project Designer." This information is usually found on the cover sheet or title block. If not found, set "flagged" to true.
3) Architect/Engineer Seal
What to Look For: Confirm that the plans include the seal of a licensed architect or engineer. Look for phrases like "Architect Seal", "Engineer of record", or "Professional Engineer Stamp." This information is typically found on the cover sheet or title block. If not found, set "flagged" to true.
4) Required Branch Circuits
What to Look For: Confirm dedicated circuits are listed for specific loads (e.g., kitchen small appliances, bathroom GFCI). Look for "dedicated small appliance circuits" or "bathroom GFCI." This information is typically found in the electrical schedule or notes. If not found, set "flagged" to true.
5) UFER Grounding
What to Look For: Confirm a UFER grounding electrode (concrete-encased electrode) is noted on the foundation plan and electrical notes. Look for phrases like "UFER ground" or "concrete-encased electrode per code." If not found, set "flagged" to true.
6) Minimum Room Areas & Ceiling Heights
What to Look For: Verify habitable rooms meet the minimum area (70 square feet) and ceiling height (7 feet) per code. Look for text references like "Bedroom = 120 sf, ceiling height = 8 ft." If all the rooms seem good, bring in CORRECT as the value and context as the source. If a room does not meet the requirements, bring in INCORRECT as the value, then the context as the source. If multiple rooms do not comply, create a JSON per each room. If not found, set "flagged" to true.
7) Smoke Alarms
What to Look For: Confirm that smoke alarms are located per code (inside and outside bedrooms), are interconnected, and have a power source. Look for terms like "interconnected smoke alarms" or "battery backup smoke alarms." This is typically found in the electrical or general notes. If not found, set "flagged" to true.
8) Stud Spacing
What to Look For: Confirm the stud spacing (e.g., 16 inches on center or 24 inches on center) matches code requirements for allowable spans and wall heights. Look for terms like "2×4 studs @ 16 in. o.c." This is typically found in the framing or structural plan. If not found, set "flagged" to true.
9) Is there a deck?
What to look for: Look for mention of a deck or patio. If there is a deck, set the value to "THERE IS A DECK" and highlight the text that mentions that as the source. If there is not a deck, set value to "NO DECK MENTIONED" and leave the source blank. If not found, leave "flagged" as false.
S17.1) Deck Framing Layout
What to Look For: Verify that the deck framing layout is provided, including the size and spacing of joists. Look for phrases like "2×8 joists @ 16 in. o.c." This information is typically found in the deck or framing plan. If there is a deck (check number 9) and the deck framing layout is not found, set "flagged" to true.
S17.2) Ledger Attachment Details
What to Look For: Confirm that the ledger attachment detail is included. Look for terms like "Ledger: ½ in. lag bolts at 16 in. o.c." This is usually found in the deck detail or structural notes. If there is a deck (check number 9) and the deck framing layout is not found, set "flagged" to true.
\`\`\`
Output Format:
\`\`\`
{
"checks": [
{
"check": "Footing depths",
"found": true,
"value": "30 inches",
"source": "The footing depth is specified under step footing details as 30 inches for typical foundation walls.",
"flagged": false,
"location": {
"pageName": "Foundation Plan",
"pageNumber": 2,
"title": "Footing Details"
}
},
{
"check": "Street address of project",
"found": true,
"value": "123 Main Street",
"source": "The street address for the project is provided on the cover sheet under project information.",
"flagged": false
"location": {
"pageName": "Cover Sheet",
"pageNumber": 1,
"title": "Project Information"
}
},
{
"check": "Version of the code being used",
"found": false,
"value": "",
"source": "The version of the code being used could not be found in the provided text.",
"flagged": true,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
... (and so on for all checks)
\`\`\`
Building Plans:
{document}
`
export const bpc4 = `You are a building plan reviewer. You will receive building plans (provided document) and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title). The page number is the actual page number. The title of the page is usually something like BASEMENT PLAN, FRAMING PLAN, etc.
Instructions:
1. Carefully review the provided building plans and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check then extract it along with its location details (page name, page number, and title from the JSON).
4. If the value is found, pull in a "source" that give the exact wording surrounding the value that is found
5. If a value is not found, indicate false for that check.
6. Present your findings as a JSON following this format:
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
Build Plans:
Checks:
\`\`\`
A44.1) Is it a townhome? Read through the plans and determine if this build is a townhome and thus has shared walls with a neighboring home. If it is a townhome, return IS A TOWNHOME as the value and bring in the context as the souce. If it is not a townhome, return IS NOT A TOWNHOME as the value and leave the source blank. Leave "flagged" as false no matter what.
A44.2) Zero Lot-Line Townhouses
What to Look For: Verify that the fire separation detail is included specifically for zero lot-line townhouses. Look for terms like "fire separation for adjacent units." This is typically found in the structural or architectural plans. If the home is a townhome with shared walls (proven by check A44.1 where "found" = true), if not found, set "flagged" to true.
D3.1) Fuel-Fired Appliance in Bedroom
What to Look For: Verify if a fuel-fired appliance is specified in any bedroom. Look for terms like "gas fireplace in bedroom." This is typically found in the mechanical or room notes. Leave "flagged" as false no matter what.
D3.2) CO Alarm in Bedroom
What to Look For: Ensure a CO alarm is required in bedrooms with fuel-fired appliances. Look for phrases like "CO alarm located in bedroom with gas fireplace." This is typically found in the electrical or mechanical notes. If there is a fuel-fired appliance in bedroom (where "found" = true for check D3.1) if not found, set "flagged" to true.
A6.1) Engineer’s Stamp
What to Look For: Confirm that the structural drawings include the stamp of a Utah-registered engineer. Look for terms like "Engineer Seal: Utah." This is typically found on the cover sheet or structural details. If not found, set "flagged" to true.
A6.2) Engineer’s Letter
What to Look For: Ensure that an engineer’s letter is provided for structural elements. Look for terms like "Letter from registered engineer" or "Engineer’s certification." This is typically found in the project submittals or structural notes. If not found, set "flagged" to true.
A3.2) “Not for Construction” Warning
What to Look For: Flag plans if labeled "Not for Construction." Look for terms like "Not for Construction" on the cover sheet or title block. If found, set "flagged" to true.
A9.1) Window Area for Natural Light
What to Look For: Verify that the window area is at least 8% of the floor area. Look for terms like "Window area = X sf, Floor area = Y sf", or a disclaimer stating that all windows are at least 8% of the floor area. This is typically found in the floor plan or room details. If not found, set "flagged" to true.
A9.2) Artificial Light Option
What to Look For: Ensure that artificial light is specified if the window area does not meet the 8% requirement. Look for phrases like "Artificial light provides 6 footcandles." This is typically found in the lighting or electrical plan. If window areas are not 8% or greater (as checked in A9.1, window area for natural light "found" = false), set "flagged" to true. Else leave "flagged" false.
P11.1) Upper Seismic Strap
What to Look For: Verify that a seismic strap is specified for the upper third of the water heater. Look for terms like "Seismic strap at upper third." This is typically found in the mechanical or plumbing plan.
P11.2) Lower Seismic Strap
What to Look For: Ensure that a seismic strap is specified for the lower third of the water heater. Look for terms like "Seismic strap at lower third." This is typically found in the mechanical or plumbing plan.
\`\`\`
Output Format:
\`\`\`
{
"checks": [
{
"check": "Footing depths",
"found": true,
"value": "30 inches",
"source": "The footing depth is specified under step footing details as 30 inches for typical foundation walls.",
"flagged": false,
"location": {
"pageName": "Foundation Plan",
"pageNumber": 2,
"title": "Footing Details"
}
},
{
"check": "Street address of project",
"found": true,
"value": "123 Main Street",
"source": "The street address for the project is provided on the cover sheet under project information.",
"flagged": false,
"location": {
"pageName": "Cover Sheet",
"pageNumber": 1,
"title": "Project Information"
}
},
{
"check": "Version of the code being used",
"found": false,
"value": "",
"source": "The version of the code being used could not be found in the provided text.",
"flagged": true,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
... (and so on for all checks)
\`\`\`
Building Plans:
{document}
`
export const bpc5 = `You are a building plan reviewer. You will receive building plans and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title). The page number is the actual page number. The title of the page is usually something like BASEMENT PLAN, FRAMING PLAN, etc.
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check then extract it along with its location details (page name, page number, and title from the JSON).
4. If the value is found, pull in a "source" that give the exact wording surrounding the value that is found
5. If a value is not found, set "found" to false and "flagged" to true
6. Present your findings as a JSON following this format:
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
Building Plans:
\`\`\`
Checks:
\`\`\`
M11.1) Dryer Duct Length
What to Look For: Verify that the maximum dryer duct length does not exceed 35 feet. Look for terms like "Dryer duct length = 30 ft", or "Dryer exhaust duct not to exceed 35 feet", or "Dryer exhaust shall be 25 Max length." This is typically found in the mechanical notes or laundry details.
M11.2) Duct Bends and Reductions
What to Look For: Ensure that duct reductions for bends are accounted for (e.g., 2'6" for 45° bends, 5' for 90° bends). Look for terms like "Adjusted dryer vent length for bends." This is typically found in the mechanical notes.
P1.1) Plumbing Compliance Statement
What to Look For: Ensure that a general note states compliance with the 2015 IRC or local plumbing codes. Look for terms like "All plumbing per 2015 IRC." This is typically found in the general notes or plumbing plan.
P2.1) Tank-Type Toilet Flow Rate
What to Look For: Ensure that tank-type toilets have a flow rate of 1.6 gallons per flush or less. Look for terms like "Toilet flow = 1.6 gpf." This is typically found in the plumbing fixture schedule.
A1.1) Length of Building
What to Look For: Verify that the overall length of the building is listed. Look for terms like "Building length = 80 ft." This is typically found in the site plan or general notes.
A1.2) Width of Building
What to Look For: Ensure that the overall width of the building is listed. Look for terms like "Building width = 50 ft." This is typically found in the site plan or general notes.
E3.0) Are there stairs? What to look for: Check to see if stairs are mentioned at all in the home. If there are, mark the value as HAS STAIRS and the source as the context surrounding that finding. If there are not, mark NO STAIRS as the value and leave the source blanks
E3.1) Handrail Requirement
What to Look For: Confirm that stairs with 4 or more risers include at least one handrail. Look for terms like "Handrail required for stairs with 4+ risers." This is typically found in the stair or framing plan.E3.2) Handrail Specifications
What to Look For: Verify handrail height, continuity, and returns comply with code. Look for terms like "Handrail height: 34–38 in." or "Continuous handrail with returns." This is typically found in the stair details.
S26.1) Specified Wood Species
What to Look For: Confirm that the wood species for structural members is specified. Look for terms like "Douglas Fir #2 for beams." This is typically found in the structural notes.
S26.2) Consistency with Plan Notes
What to Look For: Verify that the specified wood species matches the details in the plan notes. Look for terms like "Doug Fir specified for floor joists." This is typically found in the structural plan or notes.
\`\`\`
Output Format:
\`\`\`
{
"checks": [
{
"check": "Footing depths",
"found": true,
"value": "30 inches",
"source": "The footing depth is specified under step footing details as 30 inches for typical foundation walls.",
"flagged": false,
"location": {
"pageName": "Foundation Plan",
"pageNumber": 2,
"title": "Footing Details"
}
},
{
"check": "Street address of project",
"found": true,
"value": "123 Main Street",
"source": "The street address for the project is provided on the cover sheet under project information.",
"flagged": false,
"location": {
"pageName": "Cover Sheet",
"pageNumber": 1,
"title": "Project Information"
}
},
{
"check": "Version of the code being used",
"found": false,
"value": "",
"source": "The version of the code being used could not be found in the provided text.",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
... (and so on for all checks)
\`\`\`
Building Plans:
{document}
`
export const scc1 = `You are a building plan reviewer. You will receive a set of structural calculations and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title).
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check, then extract it along with its location details (page name, page number, and title from the JSON). Include the surrounding text where the value was found in the "source" field.
4. If the value is *not* found, indicate false for that check, leave the \`value\` and \`source\` fields empty, and fill in the location details with the provided page information if available. If page information is not available for a check that wasn't found, leave the \`location\` fields empty.
5. Present your findings as a JSON following this format:
6. If the check is not found, change "flagged" to true
\`\`\`
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
flagged: false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
\`\`\`
Structural Calculations:
{
variable1
}
{structural_calculation}
Checks to Perform:
Basic Design Wind Speed (V): Verify the basic design wind speed is listed. Look for "V = 115 mph."
Miles Per Hour Wind Speed (Vasd): Confirm the allowable stress design wind speed is provided. Look for "Vasd = 90 mph."
Risk Category: Ensure the risk category is specified. Look for "Risk Category II."
Wind Exposure: Verify the wind exposure is listed (e.g., Exposure B, C, or D). Look for "Wind exposure: Exposure C."
Applicable Wind Direction: Confirm the applicable wind direction is mentioned. Look for "Wind direction: North-South."
Applicable Internal Pressure Coefficient: Ensure the internal pressure coefficient is included. Look for "Internal pressure coefficient: ±0.18."
Design Wind Pressures and Applicable Zones: Verify the design wind pressures for applicable zones are listed. Look for "Zone 1: 25 psf, Zone 2: 30 psf."`
export const scc2 = `You are a building plan reviewer. You will receive a set of structural calculations and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title).
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check, then extract it along with its location details (page name, page number, and title from the JSON). Include the surrounding text where the value was found in the "source" field.
4. If the value is *not* found, indicate false for that check, leave the \`value\` and \`source\` fields empty, and fill in the location details with the provided page information if available. If page information is not available for a check that wasn't found, leave the \`location\` fields empty.
5. Present your findings as a JSON following this format:
6. If not found, set "flagged" to TRUE
\`\`\`
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
\`\`\`
Structural Calculations:
Checks to Perform:
Floor Live Load Calculation
What to Look For: Verify that the floor live load calculation is included and meets code requirements. Look for terms like "Floor live load = 40 psf" or "Live load calculation = 50 psf." This is typically found in the structural calculations or general notes.
Roof Live Load Calculation
What to Look For: Confirm that the roof live load calculation is provided and meets code standards. Look for terms like "Roof live load = 20 psf" or "Live load for roof = 30 psf." This is typically found in the roof framing plan or structural calculations.
Flat-Roof Snow Load (pf): Ensure the flat-roof snow load is listed. Look for terms like "Flat-roof snow load = 25 psf."
Snow Exposure Factor (Ce): Confirm the snow exposure factor is provided. Look for terms like "Ce = 0.9."
Snow Load Importance Factor (Is): Verify the importance factor is included. Look for "Is = 1.0."
Thermal Factor (Ct): Ensure the thermal factor is listed. Look for "Ct = 1.1."
Slope Factor(s) (Cs): Confirm the slope factor(s) is included. Look for "Cs = 0.8."
Drift Surcharge Load(s) (pd): Verify the drift surcharge load is provided where the sum of pd+pf exceeds 20 psf. Look for "Drift surcharge load = 15 psf."
Width of Snow Drift(s) (w): Ensure the width of snow drift(s) is specified. Look for "Snow drift width = 8 ft."`
export const scc3 = `You are a building plan reviewer. You will receive a set of structural calculations and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title).
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check, then extract it along with its location details (page name, page number, and title from the JSON). Include the surrounding text where the value was found in the "source" field.
4. If the value is *not* found, indicate false for that check, leave the \`value\` and \`source\` fields empty, and fill in the location details with the provided page information if available. If page information is not available for a check that wasn't found, leave the \`location\` fields empty.
5. Present your findings as a JSON following this format:
6. For the checks below, if not found, change "flagged" to true
\`\`\`
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
\`\`\`
Structural Calculations:
icon3s.pdf
Checks to Perform:
Risk Category: Ensure the risk category is specified. Look for "Risk Category II."
Seismic Importance Factor (Ie): Confirm the importance factor is included. Look for "Ie = 1.0."
Mapped Spectral Response Acceleration Parameters (Ss and S1): Verify SsSsSs and S1S1S1 values are provided. Look for "Ss = 0.25, S1 = 0.10."
Site Class: Ensure the site class is listed. Look for "Site Class D."
Design Spectral Response Acceleration Parameters (SDS and SD1): Confirm SDSSDSSDS and SD1SD1SD1 values are provided. Look for "SDS = 0.33, SD1 = 0.14."
Seismic Design Category: Verify the seismic design category is included. Look for "Seismic Design Category: C."
Basic Seismic Force-Resisting System(s): Ensure the seismic force-resisting system is specified. Look for "System: Light-frame wood walls."
Design Base Shear(s): Confirm design base shear values are listed. Look for "Base shear = 25 kips."
Seismic Response Coefficient(s) (Cs): Verify CsCsCs values are provided. Look for "Cs = 0.08."
Response Modification Coefficient(s) (R): Ensure RRR values are listed. Look for "R = 6.5."
Analysis Procedure Used: Confirm the analysis procedure is mentioned. Look for "Analysis: Equivalent Lateral Force Procedure."`
export const scc4 = `You are a building plan reviewer. You will receive a set of structural calculations and a list of checks to perform. Your task is to extract the value associated with each check from the text and indicate where you found it (page name, page number, and title).
Instructions:
1. Carefully review the provided scraped text and checks.
2. For each check, search the text for the corresponding value.
3. If the value is found, indicate true for that check, then extract it along with its location details (page name, page number, and title from the JSON). Include the surrounding text where the value was found in the "source" field.
4. If the value is *not* found, indicate false for that check, leave the \`value\` and \`source\` fields empty, and fill in the location details with the provided page information if available. If page information is not available for a check that wasn't found, leave the \`location\` fields empty.
5. Present your findings as a JSON following this format:
\`\`\`
{
"checks": [
{
"check": "",
"found": false,
"value": "",
"source": "",
"flagged": false,
"location": {
"pageName": "",
"pageNumber": null,
"title": ""
}
}
]
}
\`\`\`
Structural Calculations:
icon3s.pdf
Checks to Perform:
Geotechnical Information
What to Look For: Verify the design load-bearing values are provided. Look for terms like "Allowable soil bearing = 1500 psf" or "Soil compaction = 95%." If not found, set "flagged" to TRUE
Flood Design Data
What to Look For: Confirm that flood design data is included if applicable. Look for terms like "Base flood elevation = 15 ft" or "Flood zone designation: Zone AE." If not found, set "flagged" to TRUE
Special Loads
What to Look For: Ensure any special loads are identified and calculated. Look for terms like "Special live load = 500 psf for equipment." If not found, set "flagged" to TRUE
Roof Rain Intensity
What to Look For: Verify the roof rain intensity is specified in inches per hour. Look for terms like "Rain intensity = 2.5 in/hr." This is typically found in the roof drainage calculations. If not found, set "flagged" to TRUE
Failed Items
What to Look For: Identify any line items marked as "Failed" in the structural calculations. Look for terms like "Drift load calculation: Failed" or "Wind pressure: Non-compliant." If found, set "flagged" to TRUE
Not For Construction
What to Look For: Identify any items that say "Not for construction", "Not for building" or anything to that effect. If found, set "flagged" to TRUE`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment