From eeb112af7f6fcb2b44c7d7a900820b71053397b5 Mon Sep 17 00:00:00 2001 From: BobLd <38405645+BobLd@users.noreply.github.com> Date: Sun, 26 Oct 2025 15:36:42 +0000 Subject: [PATCH] Add CMap caching at document level and add MurmurHash3 hashing function --- ...andom 2 Columns Lists Hyph - Justified.txt | 1 + .../Integration/CMapLocalCachingTests.cs | 55 +++ .../Documents/11194059_2017-11_de_s.txt | 1 + .../Integration/Documents/2108.11480.txt | Bin 0 -> 26061 bytes .../Integration/Documents/68-1990-01_A.txt | 1 + ...incorporating_2020_and_2022_amendments.txt | 1 + .../Documents/FICTIF_TABLE_INDEX.txt | 1 + .../Integration/Documents/MOZILLA-3136-0.txt | 1 + .../Old Gutnish Internet Explorer.txt | 1 + .../Integration/Documents/Type0 Font.txt | 1 + .../Integration/Documents/dotnet-ai.txt | 1 + .../Documents/reference-2-numeric-error.txt | 1 + .../Util/MurmurHash3Tests.cs | 31 ++ .../Parser/PdfDocumentFactory.cs | 12 +- .../PdfFonts/Cmap/CMapCache.cs | 6 +- .../PdfFonts/Cmap/CMapLocalCache.cs | 115 +++++ .../Parser/Handlers/TrueTypeFontHandler.cs | 17 +- .../Parser/Handlers/Type0FontHandler.cs | 36 +- .../Parser/Handlers/Type1FontHandler.cs | 14 +- .../Parser/Handlers/Type3FontHandler.cs | 17 +- src/UglyToad.PdfPig/Util/MurmurHash3.cs | 436 ++++++++++++++++++ 21 files changed, 692 insertions(+), 57 deletions(-) create mode 100644 src/UglyToad.PdfPig.Tests/Dla/Documents/Random 2 Columns Lists Hyph - Justified.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/CMapLocalCachingTests.cs create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/11194059_2017-11_de_s.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/2108.11480.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/68-1990-01_A.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/Approved_Document_B__fire_safety__volume_2_-_Buildings_other_than_dwellings__2019_edition_incorporating_2020_and_2022_amendments.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/FICTIF_TABLE_INDEX.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/MOZILLA-3136-0.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/Old Gutnish Internet Explorer.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/Type0 Font.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt create mode 100644 src/UglyToad.PdfPig.Tests/Integration/Documents/reference-2-numeric-error.txt create mode 100644 src/UglyToad.PdfPig.Tests/Util/MurmurHash3Tests.cs create mode 100644 src/UglyToad.PdfPig/PdfFonts/Cmap/CMapLocalCache.cs create mode 100644 src/UglyToad.PdfPig/Util/MurmurHash3.cs diff --git a/src/UglyToad.PdfPig.Tests/Dla/Documents/Random 2 Columns Lists Hyph - Justified.txt b/src/UglyToad.PdfPig.Tests/Dla/Documents/Random 2 Columns Lists Hyph - Justified.txt new file mode 100644 index 000000000..7d4f7e5bd --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Dla/Documents/Random 2 Columns Lists Hyph - Justified.txt @@ -0,0 +1 @@ +Random Big Title Lorem Ipsum text with lists Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sodales gravida felis, in rhoncus velit rutrum at. Curabitur hendrerit dapibus nulla, ut hendrerit diam imperdiet quis. Pellentesque id neque ali-quam, pulvinar neque in, vulputate elit. Pel-lentesque ut erat sit amet massa suscipit ullamcor-per. Sed porttitor viverra convallis. Duis vitae sem-per metus. Pellentesque eros purus, egestas eget velit eget, elementum aliquet velit. Suspendisse potenti. Nulla vitae massa rutrum, blandit erat vi-tae, aliquet arcu. Aenean feugiat leo sed enim sodales vehicula. Sus-pendisse tempus hendrerit magna sagittis dictum. Duis ultrices dapibus egestas. Cras eu felis eu lectus suscipit pharetra at at lacus. Nulla facilisi. Proin in-terdum faucibus elit nec rhoncus. Proin sodaless metus sed tincidunt hendrerit. • Duis leo enim, convallis sit amet orci eget, condimentum mattis mi ; • Etiam dolor erat, maximus nec mi sed, con-vallis convallis orci ; • Morbi viverra diam in diam cursus, vitae aliquet velit tempus ; • Donec at nisi fermentum, ultricies odio eget, egestas massa at nisi fermentum, ul-tricies odio eget, egestas massa. Donec ultricies cursus odio sed rutrum. Nam ven-enatis metus vitae elementum scelerisque. Ali-quam tempor sapien at turpis posuere eleifend. Sed placerat posuere nunc vel efficitur. Quisque auctor felis vel lectus dictum fringilla. Quisque vo-lutpat pulvinar© elit. Aliquam ultrices feugiat ali-quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sus-pendisse imperdiet ex lorem, porta bibendum pu-rus ultricies id. Integer vel lacus sapien. Nam sodales ante eu risus facilisis placerat. Aliquam suscipit pulvinar ultricies. Aenean pulvinar, ex ac fermentum egestas, erat nisi feugiat velit, vitae suscipit tellus odio vitae quam. Morbi elementum sem in elit posuere, non rhoncus magna fringilla. Phasellus cursus in dolor laoreet rutrum. Curabitur tincidunt risus ullamcor-per, vehicula velit at, pulvinar metus. Donec quis ante leo. Vivamus pharetra, nisl ac vehi-cula tempor, tellus lacus aliquam sapien, eu congue nibh quam sit amet odio. Quisque metus arcu, sem-per nec consequat eu, pellentesque vel sem. Sed purus risus, tincidunt¹ sit amet dictum vitae, euis-mod id nibh. Praesent ultrices libero quis enim porta, sit amet pellentesque augue pretium. Viva-mus nec molestie nunc. Donec finibus enim nec tel-lus laoreet elementum. Curabitur efficitur placerat dolor et semper. Morbi laoreet dui eu tortor luctus, nec ultrices do-lor ullamcorper. Ut gravida sed nisl a efficitur. In tincidunt orci a condimentum semper. Suspendisse scelerisque fermentum lacinia. Vestibulum sit amet ornare tellus, aliquet euismod mauris. Cras suscipit venenatis ultrices. Sed diam erat, aliquet a tellus ut, viverra 12º ongue magna. Cras id justo tortor. Mauris in tortor vulputate, pellentesque nisl ac, facilisis ligula. Class aptent taciti² sociosqu ad li-tora torquent per conubia nostra³, per inceptos himenaeos. Aliquam eget dolor turpis. Mauris id molestie tellus. Sed elementum molestie nisi, at ali-quet sem vehicula nec. Morbi tempus nulla enim, a vulputate magna €51 luctus £66 eu. Fusce sodales, libero quis suscipit ultrices, metus erat auctor urna, sit amet dictum arcu tortor eu metus. 1. Ut volutpat, velit at interdum consectetur, nisl lorem consequat mauris, feugiat dignissim tellus massa ut nisl. 2. Praesent at est nisi. Pellentesque rutrum lorem sed dui accumsan gravida. 3. Pellentesque dictum nisl vitae urna luctus, congue pulvinar mi congue. Morbi vestibulum varius ipsum nec molestie. Proin auctor efficitur diam ut luctus. Phasellus cursus maximus ultricies. Mauris eu neque ut sem semper tempus. Curabitur non lorem eu nunc lobortis vi-verra at in diam. Pellentesque euismod purus a leo lobortis tempor. Maecenas mollis ligula at sem sus-cipit fringilla. Mauris sollicitudin tincidunt lectus id tempor. Etiam ut nisi est. \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/CMapLocalCachingTests.cs b/src/UglyToad.PdfPig.Tests/Integration/CMapLocalCachingTests.cs new file mode 100644 index 000000000..c878decac --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/CMapLocalCachingTests.cs @@ -0,0 +1,55 @@ +namespace UglyToad.PdfPig.Tests.Integration +{ + using System; + using System.Text; + + public class CMapLocalCachingTests + { + private static readonly Lazy DocumentFolder = new Lazy(() => Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Integration", "Documents"))); + private static readonly Lazy DlaFolder = new Lazy(() => Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Dla", "Documents"))); + + public static object[][] DocumentsData = new object[][] + { + ["68-1990-01_A.pdf"], + ["Type0 Font.pdf"], + ["11194059_2017-11_de_s.pdf"], + ["2108.11480.pdf"], + ["reference-2-numeric-error.pdf"], + ["MOZILLA-3136-0.pdf"], + ["FICTIF_TABLE_INDEX.pdf"], + ["Approved_Document_B__fire_safety__volume_2_-_Buildings_other_than_dwellings__2019_edition_incorporating_2020_and_2022_amendments.pdf"], + ["dotnet-ai.pdf"], + ["Old Gutnish Internet Explorer.pdf"], + ["Random 2 Columns Lists Hyph - Justified.pdf"] + }; + + [Theory] + [MemberData(nameof(DocumentsData))] + public void CheckText(string documentName) + { + string fullPath = Path.Combine(DocumentFolder.Value, documentName); + if (!File.Exists(fullPath)) + { + fullPath = Path.Combine(DlaFolder.Value, documentName); + } + + Assert.True(File.Exists(fullPath)); + + var sb = new StringBuilder(); + + using (var document = PdfDocument.Open(fullPath, new ParsingOptions { UseLenientParsing = true })) + { + for (var i = 0; i < document.NumberOfPages; i++) + { + var page = document.GetPage(i + 1); + sb.Append(page.Text); + } + } + + //File.WriteAllText(Path.ChangeExtension(fullPath, "txt"), sb.ToString()); + + string expected = File.ReadAllText(Path.ChangeExtension(fullPath, "txt")); + Assert.Equal(expected, sb.ToString()); + } + } +} diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/11194059_2017-11_de_s.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/11194059_2017-11_de_s.txt new file mode 100644 index 000000000..7d438940d --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/11194059_2017-11_de_s.txt @@ -0,0 +1 @@ +LesenSie die gesamtePackungsbeilagesorgfältig durch, bevorSiemit derAnwendungdieses Arzneimittels beginnen,denn sie enthält wichtigeInformationen.•HebenSiediePackungsbeilage auf.VielleichtmöchtenSie diese späternochmals lesen.•WennSie weitere Fragenhaben, wendenSiesichanIhrenArztoderApotheker.•WennSie Nebenwirkungenbemerken,wendenSie sichanIhrenArzt.Diesgiltauch für Nebenwirkungen,dienicht indieserPackungsbeilage angegebensind.Siehe Abschnitt 4.Wasindieser Packungsbeilagesteht1.WasistPaclitaxel Aurobindoundwofürwirdes angewendet?2.Was solltenSievor der AnwendungvonPaclitaxel Aurobindobeachten?3.WieistPaclitaxel Aurobindoanzuwenden?4.WelcheNebenwirkungen sind möglich?5.WieistPaclitaxel Aurobindoaufzube-wahren?6.InhaltderPackung undweitereInforma-tionenPaclitaxel Aurobindo 6 mg/ml KonzentratzurHerstellungeinerInfusionslösungwirdnurvoneinemArztoder dem medizinischen Fach-personalverabreicht.DiesekönnenIhnenFragenbeantworten, die SievielleichtnachdemLesen dieser Packungsbeilage noch haben.1.Was ist Paclitaxel Aurobindound wofürwird esangewendet?Dieses ArzneimittelwirdzurBehandlungvonKrebs angewendet. Dieseskönnen bestimmteArtenvonBrustkrebsoderEierstockkrebssein(fortgeschrittenerodermetastasierenderEierstockkrebs,fortgeschrittenerodermetasta-sierenderBrustkrebs).AußerdemkanndiesesArzneimittelzurBehandlung einer besonderenFormvonLungenkrebs (fortgeschrittenernicht-kleinzelliger Lungenkrebs,NSCLC)beiPatientenangewendetwerden,dienichtchirurgisch und/oder mitStrahlentherapiebehandeltwerdenkönnen.PaclitaxelkannebenfallszurBehandlungeinerspeziellenKrebsart,demsogenannten KaposiSarkom,angewendetwerden,diemit AIDS(AcquiredImmuno-DeficiencySyndromeverursachtdurch eine HIV-Erkrankung)inZusammen-hangsteht, wenn andere Maßnahmen,d.h.liposomale Anthrazykline,unwirksamwaren.Paclitaxelwirkt durchHemmungderZell-teilung undwird angewendet, um dasWachstumvonKrebszellenzuverhindern.2.WassolltenSievor der AnwendungvonPaclitaxel Aurobindobeachten?Paclitaxel Aurobindodarfnichtangewendetwerden,•wennSieallergisch gegen Paclitaxel,Macrogolglycerolricinoleat oder einen derin Abschnitt6genannten sonstigenBestandteiledieses Arzneimittelssind.•wennSie stillen.•wenn dieZahlvonbestimmtenweißenBlutkörperchen (Neutrophile)zuniedrigist. Diese werdenvon einem ArztodereinerSchwestergemessen.•BeiPatientenmitKaposi-Sarkomdarfdieses Arzneimittel nicht angewendetwerden, wenn eine schwere unkontrollierteInfektionvorliegt.WennSiesichnichtsichersind, fragenSieIhrenArztoderApotheker.Warnhinweise undVorsichtsmaßnahmenBittesprechenSiemitIhremArzt,bevorSiePaclitaxel Aurobindoanwenden,•wennSieeineHerzerkrankungoderLeberbeschwerdenhaben,•wennwährend oder kurznach derBehandlungmitPaclitaxel Durchfallauftritt(pseudomembranöse Colitis),bezüglichKryokonservierungvonSpermienberaten lassen.SowohlFrauenalsauch Männer im frucht-baren Alter und/oderderen Partner müssenbismindestenseinhalbesJahrnach derBehandlungmitPaclitaxel AurobindoSchwangerschaftsverhütunganwenden.Verkehrstüchtigkeit und FähigkeitzumBedienenvon MaschinenEs gibtkeinenGrunddafür, dassSiewährendderBehandlungszyklenmitPaclitaxel Auro-bindokeinFahrzeugfahrenoderMaschinenbedienen sollten,Sie sollten aber bedenken,dassdieses ArzneimittelAlkoholenthält. Eskanndaherunklugsein, unmittelbarnacheinerVerabreichungzu fahren bzw.eineMaschinezu bedienen. In jedemFalledürfenSiekeinFahrzeugfahrenoderMaschinenbedienen,wennSiesichschwindeligoderbenommen fühlen.Paclitaxel Aurobindo enthält Alkohol undMacrogolglycerolricinoleatzu nahezu50Volumen-%Alkohol (Ethanol),d. h.biszu20gproDosis.Diesentsprichteinem halbenLiter Bier oder einem großenGlas(210ml)WeinproDosis.Diese Mengekannfür Alkoholkranke undHochrisiko-patientengefährlich sein, einschließlichPatientenmitLebererkrankung oder Epilepsie(Anfälle). Die in diesemArzneimittelenthalteneAlkoholmengekanndieWirkungandererArzneimittel beeinflussen.3.Wie ist Paclitaxel Aurobindoanzu-wenden?IhrArztbestimmt, wievielPaclitaxelAurobindoSiebekommen. EswirdIhnenunter der Aufsichteines Arztesverabreicht,der Ihnen weitereInformationen geben kann.DieDosishängtvon der ArtunddemAusmaßIhrerKrebserkrankungsowievonIhrerKörperoberflächeinQuadratmetern(m²),berechnetausIhrerKörpergrößeundIhremGewicht,ab.Außerdemwirddie Dosis,dieSiebekommen,vondenErgebnissen IhrerBlutuntersuchungen abhängen.DiePaclitaxel-Lösungmussverdünntwerden,bevorSie Ihnenverabreichtwird.Paclitaxel Aurobindowird durchInfusion(alsTropf)ineineVeneüber3oder24Stundenverabreicht.DieBehandlung wirdnormaler-weise alledreiWochenwiederholt. DieBehandlungvonAIDS-assoziiertemKaposiSarkomwirdjedezweiteWoche wiederholt.JenachArtundSchwereIhrer Krebser-krankung werdenSiePaclitaxelentwederalleinoderinKombination mitanderenZytostatika bekommen.JedesMal,bevorSiePaclitaxel Aurobindobekommen,werdenSie andereArzneimittel(Prämedikation) erhalten, wieDexamethason,DiphenhydraminundCimetidin oderRanitidin.Diesistnotwendig, um das Risikoschwererallergischer(Überempfindlichkeits-)Reaktionenzuvermindern (sieheAbschnitt 4.„WelcheNebenwirkungensind möglich?“–gelegentlich).Anwendung bei Kindern und JugendlichenDieses Arzneimittel sollte Kindern undJugendlichen unter 18Jahren nichtverab-reichtwerden.Wenn Ihnenzuviel Paclitaxel Aurobindoverabreicht wurdeIhreDosiswirdsorgfältigvon einem Arztberechnet, daherist eine Überdosierungunwahrscheinlich.Wird Ihnen dennochzuvielverabreicht, wirddieswahrscheinlich dienormalenNebenwirkungenverstärken,insbesondere Bluterkrankungen,Taubheit/Kribbeln insbesondere der Arme, Hände,Beine oder Füße,sowieVerdauungsstörungeneinschließlichErbrechenundDurchfall.GEBRAUCHSINFORMATION: INFORMATION FÜR ANWENDERPaclitaxel Aurobindo 6 mg/mlKonzentratzurHerstellung einer InfusionslösungPaclitaxel•wennSie ein KaposiSarkomhabenundeineschwereEntzündung derSchleimhäute(Membranen, die Körperöffnungenauskleiden) auftritt,•wennSieProblememitdenNerveninIhrenHändenoderFüßen,wieTaubheitsgefühl,KribbelnoderBrennen,gehabthaben(periphere Neuropathie),•wennSie dasBlutbetreffendeProblemehaben, wieetwaeineVeränderungderAnzahl einiger Blutzellen,•wennPaclitaxel AurobindoIhneninKombinationmiteinerBestrahlungderLungegegebenwird.Kinder und JugendlicheDieses Arzneimittel sollte Kindern undJugendlichen unter 18Jahren nichtverab-reichtwerden.AnwendungvonPaclitaxel Aurobindozusammen mitanderenArzneimittelnInformierenSie IhrenArztoderApotheker,wennSie andereArzneimittel einnehmen/anwendenbzw. kürzlichandereArzneimitteleingenommen/angewendethaben, oderbeabsichtigenandereArzneimitteleinzu-nehmen/anzuwenden.WennPaclitaxel Aurobindogleichzeitig mitCisplatinangewendetwird, mussesvordemCisplatinverabreichtwerden.PaclitaxelAurobindomuss24StundennachDoxorubicinverabreichtwerden.SprechenSiemitIhrem Arzt, wennSie Paclita-xelzurselbenZeit wie die folgenden Präparateeinnehmen:•MedikamentezurBehandlungvon Infektio-nen(d. h. Antibiotika wieErythromycin,Rifampicinusw.;fragenSie IhrenArzt, diePflegekraft oder einen Apotheker, wennSienicht sicher sind, ob es sich bei dem Medi-kament,dasSieeinnehmen,umeinAnti-biotikumhandelt), einschließlichMedika-mentenzurBehandlungvonPilzinfektionen(z.B.Ketoconazol)•MedikamentezurStimmungsstabilisierung,diemanchmalauchals Antidepressiva be-zeichnetwerden (z. B.Fluoxetin)•Medikamente,diezurBehandlungvonKrampfanfällen(Epilepsie)angewendetwerden(z.B.Carbamazepin, Phenytoin)•Medikamente,diezurSenkung IhrerBlut-fettwerteangewendet werden (z. B. Gemfib-rozil)•Medikamente, die beiSodbrennen oderMagengeschwüren angewendet werden (z.B.Cimetidin)•Medikamente,diezurBehandlungvon HIVundAIDSangewendet werden (z.B.Ritonavir,Saquinavir,Indinavir, Nelfinavir,Efavirenz, Nevirapin)•ein Medikament namens Clopidogrel, daszurVerhinderungvon Blutgerinnselnangewendet wirdSchwangerschaft,StillzeitundFortpflanzungs-fähigkeitWennSie schwangersind oder stillen, odervermuten,schwangerzuseinoderbeab-sichtigen, schwangerzu werden, fragenSievor der Anwendungdieses ArzneimittelsIhrenArztoderApotheker um Rat.SchwangerschaftPaclitaxel Aurobindodarf nicht angewendetwerden, wennSie schwangersind,außerbeiausdrücklicherAnordnung.Dieses Arznei-mittelkannzuGeburtsfehlern führen.Deswegen dürfenSiewährendderBehand-lungmitPaclitaxel nicht schwangerwerdenund müssenwährendundeinhalbesJahrnachAbschlussderBehandlungmitPaclitaxeleinewirkungsvolleVerhütungsmethodeanwenden. FallsSiewährendderBehandlungbzw.innerhalb eineshalben JahresnachAbschlussderBehandlungschwangerwerden,informierenSieunverzüglichIhrenArzt.StillzeitPaclitaxel Aurobindodarf nicht angewendetwerden,wennSiestillen.Sie müssendasStillen beenden, währendSiemitPaclitaxelAurobindobehandeltwerden. BeginnenSienichtwiederzustillen, bevorIhrArztIhnenmitgeteilthat, dassdieswiedersicherist.FortpflanzungsfähigkeitDieses ArzneimittelkannSterilitätverur-sachen, die dauerhaft sein kann.MännlichePatientensollten sichvor der Behandlung4.Welche Nebenwirkungensindmöglich?WiealleArzneimittelkann auch diesesArzneimittelNebenwirkungenhaben, dieabernichtbeijedem auftreten müssen.DiefolgendenNebenwirkungenkönnen nacheinerPaclitaxel Aurobindo-Infusionauftreten.Die häufigsten NebenwirkungensindHaarverlust undVerminderungderZahlvonBlutzellen.Nach Ende der Behandlung mitPaclitaxel Aurobindowerden IhreHaarewieder wachsen und wird sich dieZahlIhrerBlutzellennormalisieren.Wenn eine der folgenden Nebenwirkungenauftritt, informierenSiesofortIhrenArzt:•Jegliche ungewöhnlichenBlutergüsse,BlutungenoderInfektionszeichen, wierauerHalsundTemperaturerhöhung.•Eine schwereallergische Reaktion–Siekönneneinenplötzlichen juckendenAusschlag(Nesselsucht),Schwellungenvon Händen, Füßen,Knöcheln,Gesicht,Lippen,Mund oder Rachen(waszuSchluck-oderAtembeschwerdenführenkann) bekommenundSiekönnen dasGefühlhaben,inOhnmachtzu fallen.•Atemlosigkeitundtrockener Husteninfolge einer Beeinträchtigung der Lunge.•Reaktionen an der Injektionsstelle,z. B.lokaleSchwellung,Schmerzen,Rötung.Sehrhäufig(kannmehrals1von 10Behandeltenbetreffen):•AuswirkungenaufdasKnochenmark, diedieVerminderung einigerBlutzellenbewirken können.Dieskanneine Blut-armut (Anämie)verursachen.EskannaußerdemzuInfektionen,vor allemInfektionen der Harnwege undderoberenAtemwege(mit berichtetenTodesfällen)führen.•Verminderte BlutplättchenzahlundBlutungen.•Leichteallergische(Überempfindlichkeits-)Reaktionen wieHautrötung und Ausschlag.•Probleme mit den Nerven in Händen und/oderFüßen (periphere Neuropathie),dieKribbeln in der Haut,Taubheitsgefühlund/oderSchmerzenhervorrufen können.•Niedriger Blutdruck.•Krankheitsgefühl(Übelkeit),Unwohlsein(Erbrechen)und Durchfall.•Muskel- oder Gelenkschmerzen.•LokaleEntzündungen,z.B.derMund-schleimhaut.•Haarausfall (Die MehrzahlderFällevonHaarausfalltratinnerhalbvonweniger alseinemMonatnachBeginn derBehandlungmitPaclitaxelauf.Sofernesdazu kommt,ist der HaarausfallinderMehrzahlderFälle ausgeprägt(mehrals50%).)Häufig(kannbiszu1von10 Behandeltenbetreffen):•LangsamerHerzschlag(Puls).•LeichteVeränderungen der NägelundderHaut,dierasch wiederverschwinden.•SchmerzhafteSchwellung undEntzündunganderInjektionsstellekann Gewebever-härtung (gelegentlich Cellulitis,VerdickungundVernarbungderHaut(Hautfibrose),Absterbenvon Hautzellen (Hautnekrose))verursachen.•VeränderungeninBluttestszurFeststellungderLeberfunktion.Gelegentlich(kann biszu1von 100Behandeltenbetreffen):•EinSchockzustand durchBlutvergiftung.•Schwereallergische (Überempfindlich-keits-)Reaktionen wiez.B. erniedrigteroder erhöhterBlutdruck,SchwellungdesGesichts, Atemnot,Hautausschlag,Schüttelfrost,Rückenschmerzen, Brust-schmerzen,beschleunigterHerzschlag,Bauchschmerzen,Schmerzen in Armenund Beinen,Schwitzen.•SchwerwiegendeHerzprobleme, wieDegenerationdesHerzmuskels(Kardiomyopathie),schwerwiegendeVeränderungen desHerzrhythmusauchmitOhnmachtsanfall.Herzinfarkt.•Blutdruckanstieg.•Blutgerinnsel (Thrombose),Venenent-zündungimZusammenhangmitBlutge-rinnseln•GelbfärbungderHaut(Gelbsucht).MetaPro-Norm/MetaPro-Bold/MetaPro-ItalicArtwork:8pt/Codes:8ptNonPrintingcolours:1-DIECUTPrintingcolours:1-Blackemail: laura.angelini@schawk.eutel.:08996100642LauraAngeliniPage:Date:Dimension:ArtworkNr:SONr/Version:Min.Pt.Size:TextFont:BrailleText:PZN:Supplier:Component:INN:ACTAVISNERVIANOPILPACLITAXELPr.Name:PaclitaxelAurobindo6mg/mlKonzILOBrandSolutions/Repro/DruckformenBalanstr.73/D-81541München|www.schawk.comSchawkandSGKare(MATW)MatthewsInternationalcompanies.ReproserviceEurodigitalGmbH|APartofSGK113.03.2017124X640GI-375-1216-02-P400406041/0318467/V1Selten (kann biszu1von 1.000 Behandeltenbetreffen):•Lungenentzündung.•VerminderteAnzahleinesTypsweißerBlutkörperchen mitFieber (febrileNeutro-penie).•Herzinsuffizienz.•Schwereallergische(anaphylaktische)Reaktionen.•Auswirkungenaufdie Nerven, dieMuskel-schwäche in ArmenundBeinenverur-sachen kann.•Atembeschwerden,Flüssigkeit in derLunge, Lungenentzündung und andereLungenerkrankungen(Lungenfibrose,Lungenembolie), deutlichverminderteLungenfunktion(Ateminsuffizienz).•Juckreiz,Hautausschlagund Hautrötung.•Schwäche,erhöhteTemperatur (Fieber),Dehydrierung, Ödeme, Krankheitsgefühl.•Blutvergiftung.•Darmverschluss,DurchbruchdesDünn- oder Dickdarms,EntzündungdesBauchfells (Peritoneum), Darmentzündungdurch unzureichende Blutversorgung,Bauchspeicheldrüsenentzündung.•ErhöhterKreatininspiegelimBlut.Sehrselten (kann biszu1von 10.000Behandeltenbetreffen):•Akute Leukämie(eineArtvon Blutkrebs),myelodysplastischesSyndrom (eineAnsammlungverschiedener Blutzell-erkrankungen).•Lebensbedrohlicheallergische Reaktion(anaphylaktischerSchock).•Appetitverlust,Schock infolgeBlutdruck-abfalls,Husten.•AuswirkungenaufdasNervensystem,dasDarmlähmung, BlutdruckabfallbeimAufstehenauseiner sitzenden oderliegendenPosition, epileptische Anfälle,Krämpfe,Verwirrtheit,Schwindel,Verände-rungen derGehirnfunktion oder -struktur,Kopfschmerzen,KoordinationsverlustderMuskelbewegunghervorrufen kann.•Probleme mitdemSehvermögenundSehstörungen, normalerweise beiPatienten, die höhereDosenerhalten.•Schwerhörigkeitoder Hörverlust,KlingelnindenOhren (Tinnitus),Drehschwindel.•Unnormaler Herzrhythmus (Vorhof-flimmern,supraventrikuläreTachykardie).•EinBlutgerinnsel in der Mesenterialarterie,pseudomembranöse Colitis (eine durchspezielleBakterien hervorgerufeneDickdarmentzündung),Speiseröhrenent-zündung,Verstopfung.WasseransammlungimAbdomen (Bauch).•SchwereDickdarmentzündungmitFieber,wässrigem oder blutigemDurchfallundkrampfartigen Bauchschmerzen (neutro-penische Colitis).•AbsterbenvonLeberzellen (NekrosederLeber),Verwirrtheitund andereEffekte(hepatischeEnzephalopathie) durchVeränderungenderArbeitderLeber(beidesmit berichtetenTodesfällen).•Nesselfieber(Urtikaria),Schuppung undSchälungderHaut,normalerweisebegleitetvonRötung.•SchwereentzündlicheBlasenbildungderHautundderSchleimhäute (dieSchwerereichtvonErythemamultiforme überStevens-Johnson-SyndrombiszuderschwerstenFormeinertoxischen epider-malen Nekrolyse(TEN)).•ZerstörungderNägel.HändeundFüßemüssenwährendderZeitderBehandlungvorSonnenlicht geschütztwerden.Nicht bekannt (Häufigkeit aufGrundlagederverfügbarenDaten nicht abschätzbar):•Tumorlysesyndrom(durchAbbauprodukteabsterbender KrebszellenverursachteKomplikationen), dieseskann beispiels-weise MuskelschwächeaufgrunderhöhterKaliumspielgelim Blut,akutes Nieren-versagen aufgrunderhöhterPhosphat-spiegelimBlutoderKrämpfeund Bewe-gungsstörungenaufgrund erniedrigterCalciumspiegelim Blutverursachen.•Augenkomplikationen (Makulaödem,Lichtblitze,Fleckensehen)•Venenentzündung•Hautverhärtung (Sklerodermie)•SystemischerLupus erythematodus, derhauptsächlich charakterisiertist durchwiederkehrende, roteStellenauf der Haut,diemitEntzündungsphasenvon Gelenken,Sehnenund anderenBindegeweben undOrganeneinhergehen.•Disseminierteintravasale Gerinnung,oder„DIG“,wurdeberichtet. DiesbetriffteineernsteErkrankung, bei der Menschenzuleichtbluten,zuleichtBlutgerinnselbildenoder beides.Andere mögliche NebenwirkungenMacrogolglycerolricinoleatkannschwereallergische Reaktionenhervorrufen.WennSie Nebenwirkungenbemerken,wendenSie sichanIhrenArzt.Diesgiltauchfür Nebenwirkungen, dienicht in dieserPackungsbeilage angegeben sind.Siekönnen Nebenwirkungenauch direktüberdasBundesinstitutfürArzneimittelundMedizinprodukte,Abt.Pharmakovigilanz,Kurt-Georg-Kiesinger-Allee 3, D-53175 Bonn,Website:www.bfarm.deanzeigen. IndemSieNebenwirkungen melden, könnenSiedazubeitragen,dassmehr Informationen über dieSicherheitdieses ArzneimittelszurVerfügunggestelltwerden.5.Wie ist Paclitaxel Aurobindo aufzube-wahren?BewahrenSie dieses Arzneimittelfür Kinderunzugänglichauf.Durchstechflascheim Umkarton aufbewahren,umdenInhaltvor Lichtzuschützen.Siedürfendieses ArzneimittelnachdemaufdemEtikettunddemUmkarton nach„Verwendbarbis“ angegebenenVerfalldatumnichtmehrverwenden. DasVerfalldatumbeziehtsichauf den letztenTagdesangegebenenMonats.EntsorgenSieArzneimittel nicht im Abwasseroder Haushaltsabfall. FragenSieIhrenApotheker, wiedas Arzneimittelzu entsorgenist, wennSiees nichtmehrverwenden.Sietragen damitzumSchutz der Umweltbei.6.Inhalt der Packungund weitereInformationenWas Paclitaxel Aurobindo enthält•DerWirkstoffistPaclitaxel.•1 mlKonzentratzurHerstellungeinerInfusionslösung enthält6mgPaclitaxel.•Diesonstigen BestandteilesindCitronen-säure,Macrogolglycerolricinoleat 35(Ph.Eur.)undEthanolabsolut.Wie Paclitaxel Aurobindoaussieht und Inhaltder PackungPaclitaxel Aurobindo6mg/mlKonzentratzurHerstellung einerInfusionslösung isteineklare,farblose bis hellgelbe,leichtviskoseLösungin Durchstechflaschenaus Glas.Packungsgrößen:1 Durchstechflaschemit5ml(30 mg/5 ml) (N1)1 Durchstechflaschemit16,7ml(100 mg/16,7ml) (N1)1 Durchstechflaschemit25ml(150 mg/25ml) (N1)1 Durchstechflaschemit50ml(300 mg/50 ml) (N1)Pharmazeutischer UnternehmerundHerstellerZulassungsinhaberPURENPharmaGmbH & Co. KGWilly-Brandt-Allee281829MünchenTelefon:089/558909-0Telefax:089/558909-240HerstellerS.C.Sindan- PharmaS.R.L11 Ion Mihalache Blvd011171BukarestRumänienoderActavis ItalyS.p.A.–NervianoPlantViale Pasteur1020014Nerviano(MI)ItalienDieses Arzneimittel ist in den Mitglieds-staaten des EuropäischenWirtschaftsraumes(EWR) unterdenfolgenden BezeichnungenzugelassenBelgienPACLITAXELAB6mg/mlTschechischeRepublikPaclitaxel Actavis6mg/mlDeutschlandPaclitaxel Aurobindo6mg/mlKonzentratzurHerstellungeinerInfusionslösungSpanienPaclitaxel Aurovitas6mg/mlconcentradoparasoluciónparaperfusión EFG.FrankreichPaclitaxelArrow6mg/ml,solution à diluerpourperfusion.ItalienPaclitaxel AurobindoNiederlandePaclitaxel Aurobindo6mg/ml,concentraatvooroplossingvoorinfusiePortugalPaclitaxelAurovitasDiese PackungsbeilagewurdezuletztüberarbeitetimDezember 2016.GenauereInformationen findenSieaufderInternetseitederPURENPharma.Diefolgenden Informationen sind nur fürÄrzte oder medizinischesFachpersonalbestimmt:HandhabungshinweiseZYTOSTATIKUMHandhabungvon Paclitaxel AurobindoWiebeiallenzytostatischen MittelnmussdieHandhabungvonPaclitaxel Aurobindo mitbesondererVorsicht erfolgen.Verdünnungensindunteraseptischen BedingungennurvonerfahrenenPersonen undinbesondersausgewiesenenRäumenvorzunehmen. EssindVorsichtsmaßnahmenzuergreifen,umeinenKontaktmit HautundSchleimhautzuverhindern. Bei HautkontaktwurdeKribbeln,BrennenundRötung beobachtet.BeiInhalationwurdeüber Atemnot,Brustschmerz,Brennen im Rachenund Brechreiz berichtet.Vorsichtsmaßnahmen bei HerstellungvonPaclitaxel AurobindoInfusionslösung1.Es sollteneinSchutzraum undSchutz-handschuheverwendetundeinSchutz-kittelgetragen werden.2.GeöffnetePackungenwieInjektions-flaschenundInfusionsbeutel sowiebenutzteKanülen,Spritzen,Katheter,RöhrchenundRestevonZytostatikamüssenalsSondermüllangesehenwerdenundunterliegen lokalen RichtlinienzurHandhabungvonGEFAHRSTOFFEN.3.ImFalle einesVerschüttenssinduntenstehende Anweisungenzubefolgen:–esistSchutzkleidungzu tragen–zerbrochenes Glas mussineinemABFALLBEHÄLTER FÜRGEFAHRSTOFFEgesammeltwerden–kontaminierte Oberflächen müssen mitreichlich kaltemWassergründlichgereinigtwerden–die gereinigten Oberflächen müssenanschließend gründlichabgetrocknetwerdenunddas hierzuverwendeteMaterial mussalsGEFAHRSTOFFABFALLentsorgtwerden.4.Sollte Paclitaxel Aurobindo mit der Haut inKontaktkommen, sofortmitvielfließen-demWasserundanschließendmitWasserundSeifeabwaschen.ImFalle einesKontaktesmitdenSchleimhäutensofortgründlichmitWasserabwaschen.WennSieirgendwelcheBeschwerdenhaben,suchenSie einen Arztauf.5.Sollte Paclitaxel Aurobindo mitdenAugenin Kontaktkommen,spülenSie diesemitreichlichWasser.SuchenSieumgehendeinenAugenarztauf.Herstellung derInfusionslösungSogenannte„geschlosseneSysteme“,z. B.einChemo-Pin oder ähnliches, solltezurEntnahmederDosenaus derDurchstech-flaschenichtverwendetwerden, weilderGummistopfenbeschädigtwerdenkann,wodurch dieSterilitätverlorengeht.Zubereitung,Lagerung undHandhabungsolltennichtmit PVC-haltiger Ausrüstungerfolgen(siehe„Inkompatibilitäten“weiterunten).Vor der Infusion mussPaclitaxelunteraseptischenBedingungenverdünntwerden.Diefolgenden InfusionslösungenkönnenzurVerdünnungverwendetwerden: 0,9 %igeNatriumchlorid-Infusionslösungoder 5%igeGlucose-Infusionslösung oder 5 %ige Glucosemit0,9%igerNatriumchlorid-Infusions-lösung, oder 5 %ige Glucose in RingerlösungaufeineEndkonzentrationvon0,3– 1,2mgPaclitaxel/ml.InseltenenFällenwurdeüberAusfällungenwährendderInfusionvonPaclitaxelberichtet,üblicherweise gegen Endeeiner24-stündigenInfusion.DieUrsache fürdieseAusfällungenistunklar, mangehtjedoch davon aus,dasssiemiteinerÜbersättigungderverdünntenInfusionslösunginZusammenhangstehen.UmdieGefahrvonAusfällungenzuverringern,sollte Paclitaxelsobaldwiemöglich nachHerstellungderverdünntenInfusionslösungverabreichtundübermäßigesSchütteln solltevermiedenwerden.BeiderZubereitung kann die LösungSchlieren bilden,welcheaufdasLösungs-mittel im Konzentratzurückzuführen sind;diese sind durchFiltrierennichtzubesei-tigen.Umdie Gefahrvon Ausfällungenzuverringern,sollte Paclitaxelsobaldwiemöglich nachHerstellungderverdünntenInfusionslösungverabreichtwerden.InfusionstechnikPaclitaxel Aurobindo Infusionslösungmuss alsintravenöseInfusionüber3oder24Stundenverabreichtwerden.Paclitaxel AurobindoInfusionslösungsollteüber einen In-Line-Filtermit einer ≤ 0,22 µmMikroporenmembraninfundiertwerden. (ImVersuchmit einem entsprechenden Infusions-system mit In-Line-FilterwurdekeinrelevanterWirkstoffverlustfestgestellt.)Die InfusionssetssindvorGebrauchgründlichzuspülen.WährendderInfusionistdasAussehen der Lösung regelmäßigzu inspi-zieren. Die Infusionist bei AuftretenvonNiederschlagzu stoppen.Stabilitätund LagerbedingungenDurchstechflascheim Umkarton aufbewahren,umden InhaltvorLichtzu schützen. BeiLagerungimKühlschrankkannsich einNiederschlagbilden,dersichbeiZimmer-temperaturdurchleichtesSchütteln bzw.vonselbst löst.Die Qualität des Arzneimittelsistdadurchnicht beeinträchtigt.WennSchlierenbestehenbleibenodereinunlöslicherNiederschlagfestgestelltwird,istdieDurch-stechflaschezuverwerfen.Auf dem EtikettunddemUmkartonisteinVerfallsdatum angegeben. Das Arzneimitteldarfnach demVerfallsdatumnichtmehrverwendetwerden.NachAnbruch:UntermikrobiologischenGesichtspunkten kanndas ArzneimittelnachdemerstmaligenÖffnenbismaximal 28Tagebei25°Caufbewahrtwerden. AndereLagerzeiten und -bedingungennachAnbruchliegeninderVerantwortungdes Anwenders.Diechemische undphysikalischeStabilitätder gebrauchsfertigenInfusionslösung wurdebei5°Cundbei25°Cfür einenZeitraumvon7Tagen beiVerdünnungmit5 %iger Glucose-lösung und5 %iger Glucose in RingerlösungzurInjektion nachgewiesen,sowieüber14Tage beiVerdünnungmit 0,9 %iger Natrium-chloridlösung.UntermikrobiologischenGesichtspunktensolltediegebrauchsfertigeLösung sofortverwendetwerden.Wennsienichtsofortverwendetwird, liegen die Lager-zeiten und -bedingungenbiszurVerwendunginderVerantwortungdesAnwendersundsollten normalerweisenichtlängerals24Stundenbei2– 8°Cliegen,wenndieVerdünnung unter kontrollierten undsterilenBedingungenstattgefundenhat. NachVer-dünnungzureinmaligenVerwendung.InkompatibilitätenUm die Exposition desPatientenmitdemPlastifiziererDEHP(Bis(2-ethylhexyl)phthalat)zuminimieren, der aus PVC-plastifiziertenInfusionsbeuteln,Setsoderanderenmedizinischen Instrumenten ausgelaugtwerdenkann,solltenverdünnte Paclitaxel-Lösungen in Flaschen, die keinPVCenthalten(Glas,Polypropen), oder Plastikbeuteln(Polypropen,Polyolefin) aufbewahrtundmittelsPolyethen-Infusionsbesteckverab-reichtwerden. DieVerwendungvon Filterein-richtungen (z. B. IVEX-2),diekurzeinnereund/oder äußere plastifiziertePVC-Schläucheenthalten,scheinen keinesignifikanteDEHP-Auslaugungzubewirken.DiesesArzneimitteldarfmit AusnahmederweiterobenimAbschnitt„Herstellung der Infusions-lösung“genanntenSubstanzen nichtmitanderenArzneimittelnvermischtwerden.EntsorgungAlleMaterialien,diezurVerdünnungoderVerabreichungverwendetwurden oder dieauf andereWeisemitPaclitaxelinKontaktgekommensind,solltendenüblichenStandardsfürzytostatischeWirkstoffeentsprechend entsorgtwerden.400406041 GI-375-1216-02-PMetaPro-Norm/MetaPro-Bold/MetaPro-ItalicArtwork:8pt/Codes:8ptNonPrintingcolours:1-DIECUTPrintingcolours:1-Blackemail: laura.angelini@schawk.eutel.:08996100642LauraAngeliniPage:Date:Dimension:ArtworkNr:SONr/Version:Min.Pt.Size:TextFont:BrailleText:PZN:Supplier:Component:INN:ACTAVISNERVIANOPILPACLITAXELPr.Name:PaclitaxelAurobindo6mg/mlKonzILOBrandSolutions/Repro/DruckformenBalanstr.73/D-81541München|www.schawk.comSchawkandSGKare(MATW)MatthewsInternationalcompanies.ReproserviceEurodigitalGmbH|APartofSGK213.03.2017124X640GI-375-1216-02-P400406041/0318467/V1 \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/2108.11480.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/2108.11480.txt new file mode 100644 index 0000000000000000000000000000000000000000..c7e1277aee3a1fd8b8c766c6c98f7652a8b180b8 GIT binary patch literal 26061 zcmcJ2TW{-Fmfrl7lLk7l%M>l@?o(ZpmL=Jit(ztJj)MUuQW7nS)DcO`@^k?e1esJL zdB~Xtrn}J>41!6Je$7krkf+ppe#H3$>7S5qt-Uu%`BGIglXRiWwnXl|_S$QG>$-P! zz3Otg@*kar8QLA&T-ia`v7PB`fu7ZJT4u_e|Hi@SF#G6*%F>pB%epF!k5k#o3si(HH8WpHIa%x;fUPdB++1t~vBQ z+jadg^wUH1oWRtYq3LeKQ+o2)&m+%SI=T~94+q13wKin3R*EcbJ#)r0%MQjXXM{z~ z>?pAP$=LTo`!S46*9mOPHN9zs6)k+rc7q@q&&=Sk(I1AsW7%HlOg5H3ju!Yen5=xz z@4J#Cqm650q2|=_re?xHPjJvv9NejPI=i7go_Ws4$PP4&KeBDl@y09L4DhbwE&XNW znk#TjAFln0xo}*^4)6<&YK~`iFf$))dttApwxwD2()KL8=zHs#ja98;3Qf<#9N3fq zySTEK8SEt}x2@5JW^!$RwV+L0x)^O_TQo|b*L;^&tYIko(OxV;ia)_0t{H~*N(0jZ z)59tp&$1seMQX9Z*e7v`d1VH62oB>R$AUD)gh6_2EQE;L#50Ti0i~GBTiKbF>CJ5` zB1+BiI9jC!z*@voOp?VwZ+hX(2^Oa3fj|=kPi-&4ia>ZgC#b*&LKti-O@TI}rK~Uy zEqO9=#*XccA+GpS@mx-^_E&RlZ9Cormg!7E5}si(0z<^=F)~puMoTX}Bg95?Jb#7h zLP!|zIj>hzn|@wAKEh$ls3cC}yYF3lhlK!PO^ z*pX!vSP*D02#JT`%nY^BW*mhfM&?DvvtqkO8|JuLx_|+-ufFGQa@lOmQ?LT>f)miw zQD{1z>4ATQ5TpsrgtZgS{3r}UY!x0Ho3s*V>N#Mu>4lav$xN^<-q^-Q$1i(!5NHq^ z>@o=`X@!~l?$^Q6hD0p+LAgtMtv0B2JGDk{IQaa{e`*pk0l7#lHbH1Fg3o{Rx2X?f zH2Cth4_P3gWFUsb?#sTy4gm*5kXV&|*0{Oq_UnUcqUq1EGWc>EfAngt-M8gpkC@8$ z+fa$|pF^LX%jOKd`_IN?$ZwC4OdbgZHx6m!s2MN0EWIzWw5IyFpN4CIz!x3R=p80DMD<$vnpKQ1a zuthAM9y}EIDS&?1AOeilBG5?7HB%|eK5QzPRE?AYf@-=MxVaJBy)g#X9NoslWH4Ni zllDxoCJ4_ITMYkL%)m0G(1g54b4d=B>nfs{6M_*$AB-wV0o+O+B$Lqj2w4q%Ij=(Q7{sq_&#@jdECm8{Fj%@Nbx8!FG6$Sr+60dPPxGQM~nvsLJV7piL7^2~B zw0MN?Ln9y@b4>UgI|yFH(D3I0|0}qkWN3+f?$k%jGF!mR!qbLna($Rt3(NwmgmHn7 z%yhvydyOa=3kmt~F^2TTLk%z)xNyqiy@Vcm$!Ko~5<^Fqgc(bu zT{2*q(rU6F6K4fEp{JplBzR<~C=6j16XFR8c`FFh7AB+}29Dz%s0%=d&6;}ALO4JZ z1+Yq<#WRrtMj?4LA|Q)H9!$;j2=Zgg9m^N^j$xw}Z3g=y@IT@&^)8?XvulZdOD_Pl zk+UVjfB>;>T9c3oSS|s^#24fjAhpDSz+8yv9Z@kkG5A4B#irR#8z6Rk7!+-b{d+kJ zG+D(k6o#Z{!^+@E*32~LU$PrRVDJp>m8GBfYeHb6CPd(fAPUBhrc8~T@Y@M2sKXe@$x^u@ zcg1v>SxRN%jf*Aa*$M!96p$}XNaj|w4CI#)lt2l`BY^=q6x>Hkj$>0CONo@6%5;fo zKu?4esQbm{rUMIYr9TW=J9{4v?M+?}Q*B#Q=~TM2m&F+JH|^K*oyf1v_kn zZ(#ZYW|+9aRBp+LKY`wjTUh1;)@u$V50rBD`rF`EeL`BQw$j@YD`MrHffzlfBcKCp zAp1i>4mtRv4cH}xU5Ph&Y<1dioDTYC&8hbf3s_j|>Grle9^aQn z(bMIi*c?3g&8xF|c(Q3d4lA|t?PK-a9o}Ev=E70$es>3W|-vd8KiC8lGCM$4zT;zbSi_e7ShDw8CNU{MK&GmyOd+r?+xf2Zd?jw9%`r z-1(z-ZgsQg`P-R)kc=qdi$(8Gi(0*>0(%T z=r^A7MQ2&wTn&3c_wj1dA5?~W5662a>#UzUsyXe(qt&UO)%x?<`sup)ab7Dm4*m1v z{&M{Buy!#nWY5><;aRs`X_(#l!e|X<k9Ia%WQdb+q|DUk9&iQ zZg)^K+H=Fatu6`|gZ}CMY5V%)<4Nh@vJ@N?_xscE>cQ(Y_k((AuR2=a-(D?#wl4+X zFaN@LT^8=WZ1XCtEsOc)`YLMIb5^^zc???fRzu3dp7&#Ap*XmiUwfO)O|f{r-piZ0 zeskHKC|PK~kcIZptj&WcDtQ;ia+E)~AD=A_t}PG0PWL{}vSaJGa&>%O3{TqkX9v@x z#rgTXF*>|JQuw?b)NB3h^uX;Dz42syH0^)9j>hKxVZGxXIj#DA{j%$K4vx;-ja=n% z)ftVWWmI3y&K{ce%Yk3N3MNzIxN&n(zi3b0pgekr`m2N4;r!ydede_NX=t`@y-~Gw zfE>})^a1?dhvt#GHJgn5K*Zb3j zF+OjfUid}VD%ArfJmk-Ogk>TWqF}N6Sa-_yw2?yt~dmu8xKl z96BKfM^X-|Z_7ci`Ia2m|9|D6?!|IYy1#n37)2G+7>vSWXVGtzPmf3Q>B(yD46jdH zS0DSG?&%5s*bI;MkW#t6w!NM`$qrc#W>OAHt<(M}k%MZI$CWY9ySQW{9P0Ck{1i$% z$O2GedFHRnkduAvbPH$u?&h&HS?@m%T=)2-Y?SuSd?`bf{2N$ubJ#et=6nriY9rCxj)BkIS3m#=UW!Ydm4oU1jdSrZF5Fidz1-#C)Um7W zi_-ky*tlGc!hGla(muT`R?Rc3YF>`^jthnRQRA==*jwM)$EEfpXl83pady#n&FT{@ z*pqp5e&Ju%Dkp_OznDEA?}a!0`~GqL{Bj=MIQyMq^XmA%-K#zgHn;WJ)bMichsORW zclbDt+TM9^adkd92^v-ZbZ>A{4=<*pYTds&o*mx0vyFdodj9m(KRm2e{K7DMHM(?9 zPxtm~R}V(T&5xs!QJPJ{eq$9hK0flZNH4u8^`)|6l!l;8 zHQYH>-_$6%%k>&~u<$53Kg8(@b(^Ax*LQ=l(z~fS`~rb z)_P>+4M9;nGkLTkFrGM%wv};_-bQ2)r}pA>062o+l9Mqg$a2&Le^-RT7L|bE+A>q( zq1nMFPU0KIr)OX4gQY#@3K*(k8nO{_s?neP0tJCjzYy!8f~CwSN`f&JrzzFIiOl`= zpa1atUm2RN>l*zghWVNtbWPHasZ6nd6U^~DF@+iMM?4NEm+&f&Y;^ctSL|O)U(2RT%DvbzzGOja6Vb`@0exUdtM9U?ztlQxXg}Ne5i5yx|?Gcrr zAW5?%LFH@3AsNLY3qr|G%}gSgA1>{Pvh@q265A9g4QNcoef*c&RgvI}OFiaRtw)6a z1PvtaltxGNn_i~laR$xtB>d>r5TnzE_>(nKbhH>5%7KSm-=M;79MNv`QiO&worhO3 zltPkNIEBbV7v+YhVMOM(pbb$lF;~bd&YTewF#|x5x}sp5p)v?%TPUx$JwKzEN*J=N zrbd58fhZ|eQ4PLB&T%KOZKMFTp*eExT=@a;z`s>K>=MT6#=s6^5cMZ4)eY4Lk#Y#) z?ia=vwMU8Qb0diBsxOdG1CJ=RFQRE^26Q;1Fay*>$VGC;r-~!GD7LbOV57`MO4$a} zQwYS_Jrqi*Hifi?YD=LhT~tMaP`-@P0B4%fPZG(`&>!L@O)6tbq9Y4!`62d*8VSUk zL@4r-s9#Zzi;Hb>R*_R~RQ3#gxgL!y!;4;y7(_r8^yh#7*PZwiK*(=CfAimVIn^lt zP^?RMn#zHPzIqqV56C4M^aFp9POVXGjS_2LVm^m6ek(!l9Zm+~vHXTGOiPMCyEwNVfVfL2JL+Loe2@bN1``ak~S^S}Q$`1yBV z8Ltz$liQVhiFxAfg#3s>l}0NL@J5JQLt>e!_$Bi8>M>$B>?tkGB!1?VAgHzQQ01w3Gxzx(dj_&0HgOFe{v8c9UF zuvCK;mGa;M1-1kdDeE7}ozFm?$pqb%KWLy`S{{(YDK6Rj5*vRMq}HhRJjbATL1^ZZ znN})Scs^yM!2k)h3^}<5RaM&NM8j6jGD+-ITWQEa%XI>kna z^V=IpcU*IcwG-nC@q&Ip;ru1BEoN^BldO0SQ%YGmnJtIFrLw16B1v*6EtBdL+TPb^ zu1|o{l@hOnRcz*gIq76JS_h!sqBDvdOQ4gYU*=ZzV=@z{k|YC>6rm6jZ&Ko%amq3Q zH(7oGTnUE)ocJTOFZR6f_a`wJb4-qyQBEJe{(C^er$55Gf?@+6x#5X6nDWNh$Y=>t zxTX><5_+W2;H#HhQX7%1hTtPTjZ*G!KmDKo@vre6^cyqamtTJ+oHF6&Nr3!!^aOqf z0Db!PPJVYt-GXSz1REW$EVApMMU;sqw-Vx+Obz)_cFB~TCv2PIBA;H5NKL5`Fz&BI zSy?SYnmw?TldzB=<|di9cnA-j8<>Q;FUbO8D^Y52HwYk5vf+LUv=@m zf^;8lEcpBz4T;GOWFB=Q_@Mw5@=cZD{%=K1q^;^mE%ef0M%bZWM4i)Q~=P?gG8tVBd?qkAYD7jmExir_LsK%EL}D~Gu|g6*Km{5pxv2B-Ogrxi zTF&@j=ttDRL5OF<9RfblA1|v~anr>bl7P0Wc%!j4A%wh_G52DXA)euJCBx9eIO3i=C=Y5} zs)}ZrBX|+|Fx7Py?-GzP5|#xgYic{s6sM0ViS03v|^54$Kt$fg0NF@TK&{w$K=j?c9jQ4j?Habrs^>4etg}LAE$(mNa`9l$}QDGomMr zELDmH4mAr<*G}jQ_R#FSVXyHeG^t1Y)y0Df=|{ZAGLeMBHv&1yq47ksx?)qj-NGiT zkFiLy`2cpTQ$=z?1B)UH1b+dIDd{>bkxz*M%z)3;D9PZoGhnVEdFOa{z)UE&!mw?G zCPoNDEh0FP?&0=Qr;`J3OM6L>*+ zOA1SAVdQ`U-|)?vfE7W-#CZrt=-)%VI-KEKktfN$Kf*%SK9Nn;dqmgNfQB|E+C+|t zVY;MLu#~5qA0!tz$e>(+5K9jrS)$I)y<*O8#iYpe)w*#4$)U{l^#r0Cqg-`24H>c`hCiF_ApUBEqZfVPTq+ zEL+<7NX?P-^~5`$Ox5&YPLfpzYw9Y-LXyJ~sk0HBc0ux$Q?Yvo z@Th}#ac7h?ql{KIIi~XKwvc2CheX?OkP~U|wM|AG9g$dpZRN?>$RuTKTuDLwi5eKx zyKZb-pkHXXpq61yjS7(je3}nfG7?+xe3GzNHdmu}N`vAKi!5|^#=!?HwvKk$+VBo- zwN)3@Tt4lCj~O&M)d@%@0io$UID_uyJvb;4Nx^_fm;>^V9rcY$R;V*21muG}5I+ z46rKx3jPF+oFRLHZYIc_<)ds6@M$*ND*hB6Ay^yTu^-JjxosRESCbCU5g5ZUPj{dJQiTwk4<^hDJVJgIoClUs z(SjY^F?>{HiUOiNcwaiGWa%lgucAodb2BBh=Rhq;d-#K_J}& zyTB~UFHdb`OYb9`{t)>HtddE<(6g%CZqRrn*sqA?Q?|0@or`W z*u69{acV_Mu2NybjW{om_o0kk&fl=Q_=v!VPz%}wOW(S+LxfcA3{0yAF_Hb|H_LXg3MWHn~VMB zM*j6zW8X!r0W3^gb8L`EXJK(*hD`5~z-~!vAT%1TBM8HRLKkNRkjRAPHtD!abzYgnvh8DA>?~Nyr`v9KxASA5~-tjk4W6 zp`KVOY@O6~q*EygjWdR<2=Ug^$_P5Sl^nPNYw3^Bq)5pz_Ip#?z`C*}g&g&1LIs3x zkG&Uv3O^5iFd!~c4eKaLOGi=lM3O8hNW$6aYL8El#1$4mi4qWKPjWueMdT$;iCQ~L zlls)bOL%J9A)nM+;pB{pIO$_7n%!)68Fy7ax{5Rl8apJV95?{(;8DU@Lxp0E1n=+> zL4oX*{~iaBc3+ue^Ygd=(X?1 z-~4S>FXea9>m4j{e&7{Qi(P8v1t1Qtlz#demL;$NGc=)Y4EE@B1a1_lp&|~kh4N~G zQVNeLDUE=a)>qC{ek#uVuuS<=KN1hb3ryjxIIbJh23&!26isoak)Q-xyIfMHlh7Hz zssr|kBvY40a%7KkS6e;J&>=_*W#{+*;j64(Ebk%#g(KO5hp-*^Ef#OJa$+Of zG|uA#fl`7*?8Q3dHd3ZHLk&9`PN(A3?bbQCe2Iq^)y<&?BmWUW z^RK9hT}mlJC#-=9rBFJi55mGsMytC>2tk+fB0!p8)!p3XKgf+D5@P4{&46D?Inn}b`q&Oo zeNlE(q~r(E#XD5U?s788MJfV`BZ`}6e4Lo_5m+L)kF}>*Cv7DaF!@9PXHjDzP`k~Z z96f+dh`l}dHXhvS72Gb6hq4F44>Z-_8E{THHDd2G?2x@QSfGf*9}ZI#PUCa~`fO0X zqhddF12%HYMWF?XR5w}5m{tcDOVG_3D(k4WJI1;l%A>{?42aC40Myi6oc-kcB$5LK za>rq6c?a;O)S_LnovF+_;B3o{#4%cI1@c~R>Hxq?CZh><)0qjZJLv&ZxT6!WgkbSe6A`BihYHO-NYQ?ux3Zm%2jTKXoD;$U7+@a-D#$k&nvwlL z;TjNRNg=tR(TVxuvk$YhxA+2Q=@Hv(zmUyJ%}nhRNixMx%I4q}3E(g4W;CAt3EUmso0Oiy8IMJN7$Gpt;&%gY(jJau# zMC{8shIsG5yEtqEDP%ES9QYlvaBAEIK&Dij83IJmfh9BmK`AW2jjg|!kp0UT8qX+XQ_cYp#8i<8dAt{lZyFrOKDT=p#*{wm{rLxoKu!sD1wL5G2S@20?;A(Vx@j@;jt6QXe+rGmd5B;2^74in%h}=YxD9tLH0aXhFGLHj21J zBVWKr2jypxd>0-{0&|QTq{47W@`chDc&n5*@B<@M@S~LfLVRl&^yxwNiz<7vA|euB z74n4~y_hZ08%8ci!<2IJ#cZXJeo;gu;>B_ySHyS4JU@~vR%nX&MdN_RsT_Pk5G`h9 z%a@e$wFb4;3Ib227lyBMLZ3P@EGnP!S}_YT##7pGfv32$~nAMD3@rCg9Ca?u_0gB;-6rHc&nVH zw<-nv8&{oxzT&~wRA2#~$QH8MQZ`%3W;@)z@XnvSt1J8bt}hGV*1I`I0quBNFW@J^ zVv*K@pR}fOcFq;oF&PY@Uhe|#UXgz+%ttu-5;xx^$^kEzGJPt+_K%~8cEG^wScaa% zPq>Pb%6}>~BS8%mW{VOMECaI`SigZa{~)hkQuR-zXuL~NC3G43D!qqoSTy1KfBKEE z>G0NHAU@JQ3C_QYYOqy57S@uD+X6NAH;4?Cmi$o`Ac43P@~5&ca=9tTnq6kgo~}$} zuY}*pl*e7akUqzSje6TP!tGu-?JI*~vZ0AZ+ZpQ);#)Ro%4m>XX~b-xriE8Dt3LFyHexk8U6(@W^nrH$hTGD^Fs%#TKCD4AcN8W{)9 zSPNgMvYk32MnO=}IGA=aRFaH?EVx3b+EUq?ru`Z1*A`WY9AfiT=pmo}{7c&3tX@Sp z^S!AWk{)Hi)iOjWjuOY|trcD_#+N%!fuTzWY6u|&^MJO9A|c%?#E?i%h|8VS0=1-d z2KfY>UYDW*LiOr+gbSSn`yl!yR`Cu@^46!WoLh7gULP3{36C zVsH?&B?9bE3wBD;=AfA?h7cv9g;TDwe<1Y9{4_<|2Wl9yb|p4v#mV_pHqfa2G|5gD z4`haiu_G;7@mXlzY@FYw0(4^UrN=tR$lGJ!k%y# z#Ubb=F1K2V_7gEa-))3MRQhs1l>L&HPBbs<6tX40#}B9e7s0M<~RZ{i38iU&Arxo+=mz zMh+3)0{%&MKnerXkm}VGCHpi9w0P1d?v@fV^G35F;j3^Ws4BuGgdNILL$X!&fa@NN zI>YG-bvXSLjrwtenxO{I z@6@FG^{5$@46Qt3MZ$%p(7nQr>9sLEa%)H~Hn5fKvVyL@?3CJRH!u3TY@#N(X2qsC znWHr_#VvD$t+@w0?9^?VM%23|jmI&XdB~vd>d$Wd9M9=)%?w?x88mu>ehm(a7dCqP z{j5)MY<`O(Epf>bOk^DpVK3}gVXfwX&- zN}_1L4fKBF2zSbKYK;LJfNp2eCi3bg)@+@E>vj!1F+I9;G>cAGy!{wvOoD8cqeLZP zfg630$0BJ!$=Axv{IO^ugYxy#cZ^Xx#qG%Sqb2WizJOez=^yLFtddZ@Q?1roI*JFV)s3jp_z3Tru6Ag9_auWo zXN`+PSHavNBp8I>{Rw>no?Qd=)F2-cpA5ZvMc0WQ`j5uj!+=gBK?1!K+yNSX_YZutaur7iTMmx7I$9f<`Y5E!tJunG@h(c`}PesPX45Y0@RT>-aV$yI`l($9UJvmH`DC5`F3qZ z)1Y|_{uoA{B?ZB{epmW1zy(IOdxEN}8EI!IUk-476w*hmaqLVLS3S3oLo=gCBIXnz z0)s9kx939xplVck3*M(BB7IVxdUDgUG=NZrNZoRZ{Rq25Ym`NNt_fuL?rbRVK$O}P z`OR9Zuj2&SDG>YApLujrpv^|(KB)T<()SqY1f2%o{ps|(KcR+9!d%u5akdQ-n?daj z2rBB)bl3=+I-b!^9``N+c^Q&{tdO3ql=FqV%7;rAb*F`c>l<*h^BgyoYKQQ^&7eDt zp0okri1176pJ7Ze_(Hjzd~Aa=$iPvd)}hm4>`9v}j{X^yKnYGZG-BcSluCsj2& zaQXq(THl;ZK!=SIy*>4{=SErUm`|>A?DLg~ERo&i%vl{l*`dXP?1s7n01^OBS`K5r zKWWONS7QkKHUhFi+?E5QSk9A0Dwa#wKZ4>k;i(ZO#PNV)CUkkpRYr2n%1m~Q^K^32HHDj zHg{HF2jS_$?(l7f5Fz;FkR?#CwozFnK*8MjQ(P+>t26qUizLapU9DItkgn!PKT6MN z!SK&_OYBD-N6yhqOGz?pjchb$mOI{S^Kp0*_gO1;G;xPF;J?J&C=mhWX9TU~07)oRm|& zrXNPY)Ib~J)FOVx4aAlPDcZD5G-F1*Z7n3Uu8{Ts*Rm!31m2VC!in{Y1Xopz;PB(L z1MMILU)pVfVFfmkg#t;;!H4I7qfm{Jr`cG-hoX}ZLROEkN;q+%T^0ZB0e?KC|FJI) z%MENG#YZ&&4Js1c(5g2yeRMiwZFc6y^jb~?c=WC#ngOoJwB^v?S-sU5cKh$EBiP&- zU>-Los>=@`bOa|Pf=KG&r*K%Lc&6?;jyZu9zapu5tw3a<2?K>GNNT Programs > Extron Electronics > Signal Processing > Signal Processing Product Control Program.The Communication Setup window appears (see figure 22).Figure 22. Communication Setup Window FOXBOX SR HDMI • Remote Control272. Select the Com port to which your or receiver is connected. Click OK. The Signal Processing Product Control Program window appears (see figure 23).NOTE: The receiver does not have an Ethernet port. Do not select TCP/IP.Figure 23. Signal Processing Product Control Program WindowStatus areaFigure 24. Status AreaThe status area provides indications of the connection status.• HDMI indicator — This indicator is green when the transmitter detects a sync signal on its HDMI video input. The transmitter reports the status on the fiber cable.• Audio indicator — This indicator is green when the transmitter detects an audio signal above a –35 dB threshold. It returns to unlit if the audio signal drops below the threshold for 10 seconds. The transmitter reports the status on the fiber cable.• Link 1 indicator — This indicator is green when the receiver detects light on the fiber optic cable connected to the Tx port.• Link 2 (Optional) indicator — This indicator is green when the transmitter detects light on the fiber optic cable connected to the Rx port. The transmitter reports the status on the fiber cable.NOTE: The transmitter detects the receiver-Tx-to-transmitter-Rx light. It reports the status to the receiver via the Tx cable. If the PC is connected to the receiver and either the primary (transmitter-Tx-to-receiver-Rx) cable is disconnected or the receiver is in the daisy chain mode, the Link 2 indicator in the control program will not show green (detected), whether the transmitter detects the link or not. FOXBOX SR HDMI • Remote Control28The Status area also shows the receiver model (multimode or singlemode), and the position of the HDMI Audio (embedded audio) switch.Control tab functions Click the Control tab to access the functions described below.Output View area NOTE: The Output View area controls are available only if the receiver is connected to a transmitter with an active video input.The Output View area provides controls that let you scale and change the position of the displayed image. To scale the image, use the mouse cursor to grab () and drag one of the handles at the corner, top, bottom, or side of the area. To change the position of the image, use the mouse cursor to grab () and drag inside the image area.Memory Preset area The Memory Preset area provides a means to save and recall memory presets. Memory presets are stored values of the horizontal and vertical position saved in nonvolatile memory. When the receiver is powered down and later powered back up, the settings are available for selection using the Recall button. Saving the settings to a preset using the Save button overwrites the settings previously written to that preset.Mute area Click the Video button, the Audio button, or both in the Mute area to toggle the video and audio mutes on and off.Image Controls area • Click the Freeze button in the Image Controls area to toggle the image freeze on and off.• Click the Auto Image button to execute the Auto-Image function (automatically size and center the input to fill the screen).Screen Saver area Select either the Black Mode or the Blue Mode radio button in the Screen Saver area. Select from 1 Seconds to 64 Seconds in the Duration of Timeout drop-down menu to select how long to wait before the screen saver replaces the video image (or select No Timeout). Click the Save button to save the changes.Picture Adjustments area The Picture Adjustments area lists the variables available in the receiver, with their minimum and maximum settings (for the input resolution, where appropriate), and the default value; and provides the tools to make adjustments. To change a value, click in the Value column for the desired variable and then either highlight the variable and type in a new value or click the and buttons. FOXBOX SR HDMI • Remote Control29I/O Configuration tab functions Click the I/O Configuration tab to access the functions described below.HDCP Notification area The HDCP Notification function enables a connected display to show a green or black screen if the transmitted HDMI video is HDCP encrypted and the display is not HDCP capable.Output Configuration area The Output Configuration area provides tools to select the output resolution, refresh rate, and HDMI format for the scaler (see figure 25).Figure 25. Output Configuration Drop-Down BoxesNOTE: Figure 25 is not an accurate depiction of the Output Configuration area layout.Menu Time Out area The Menu Time Out drop-down menu allows you to set the duration of the on-screen display.Advanced tab functions Click the Advanced Settings tab to access the functions described below.Test Patterns area Select one of five built-in test patterns (Color Bars, Grayscale, 4x4 crosshatch, Alternating Pixels, or Crop) from the Test Pattern drop-down menu as necessary to help adjust the color, brightness, contrast, and focus of the display. Select Off to output the video that is input to the connected transmitter, scaled as selected by the receiver. FOXBOX SR HDMI • Remote Control30Advanced Functions area Select the Executive Mode checkbox to lock all front panel controls except for using the Menu and Enter buttons to unlock the panel only. Select the Auto Memory checkbox to automatically apply saved position settings when the sensed input resolution changes.Aspect Ratio area Select the Fill radio button to force the input to automatically fill the output raster. Select the Follow radio button to display the input in its native aspect ratio.Enable/Disable/Daisy Chain Link #2 area Select among the radio buttons in this area to define the function of the Tx LC connector on the receiver:• Enable — The connector routes RS-232 over fiber to the transmitter.• Disable — The connector has no function.• Enable Daisy Chain — The connector routes the signal received on the Rx LC connector to the next receiver in a daisy chain.Video Shutdown Delay area The Video Shutdown Delay setting delays the digital video to help monitor sync correctly during an input rate change. Only video is delayed; embedded audio is not delayed. FOXBOX SR HDMI • Remote Control31Firmware UpgradeReceiver firmware can be upgraded via the front panel Configuration port using the Extron Firmware Loader utility from the Windows-based control program.Downloading the firmware from the websiteTo obtain the latest version of firmware for your FOXBOX unit:1. Visit the Extron website, www.extron.com, click the Download tab, and then click the Firmware link on the left sidebar menu (see figure 26).11Figure 26. Location of Firmware Upgrade Files2. On the Download Center screen (see figure 27), click the link for the appropriate firmware file.2Figure 27. Finding Scaling Receiver Firmware3. Complete the Personal Information form (see figure 28) and click the Download button.3Figure 28. Personal Information FormTIP: Select the Remember Me checkbox to avoid filling out this form in the future. FOXBOX SR HDMI • Remote Control324. Follow the instructions on the rest of the download screens to download the firmware update from the Extron website, start the Extron Installation Program to extract the firmware file, and place it in a folder identified in the program window.NOTE: Note the folder to which the firmware file is saved (see figure 29).Folder wherefirmware isinstalledFigure 29. Location of the Firmware FileLoading the firmwareTo load a new version of firmware to your receiver, call the Firmware Loader software from within the Signal Processing Product Control Program. The serial port on your computer must be connected to the Configuration port on the unit (see “Front panel Configuration port“ on page 11 for more information).1. In the Signal Processing Product Control Program, click the Firmware Loader button () on the tool bar.NOTE: If the Firmware Loader button does not appear on the tool bar, the Firmware Loader software is not installed. Install it as follows:a. On the Extron website, click the Download tab.b. On the Download Center page, click Software on the left sidebar menu.c. Locate the “Firmware Loader” line and click the Download link at the far right.d. Follow the instructions on the download screens to save the installer file to your computer.e. In Windows Explorer or another file browser, locate the Firmware Loader executable file in the file system on your computer and double-click it to open it.f. Follow the instructions on the Installation Wizard screens to install the Firmware Loader on your computer. Unless you specify otherwise, the installer program places the Firmware Loader file, “FWLoader.exe” in C:\Program Files\Extron\FWLoader.If the Extron and FWLoader folders do not yet exist in your Program Files folder, the installer creates them. FOXBOX SR HDMI • Remote Control332. If you have not previously updated firmware for the FOXBOX unit, on the Add Device screen (see figure 30), select the RS-232 tab.Figure 30. Add Device ScreenIf you have previously updated firmware for this model, click Cancel. The Firmware Loader window appears. Proceed to step 5.NOTE: The receiver does not have an Ethernet port. Do not select TCP/IP.3. From the drop-down menus on the RS-232 screen, select the appropriate Com port number and baud rate (the default is 9600).4. Click OK. The Firmware Loader window appears (see figure 313).5Figure 31. Extron Firmware Loader Window5. Select the FOXBOX receiver and click File > Open. The Choose Firmware File screen appears (see figure 32).66Figure 32. Choose Firmware File Window FOXBOX SR HDMI • Remote Control346. Navigate to and select the new firmware file. Click Open. The Choose Firmware File window closes.NOTE: When downloaded from the Extron website, the firmware is placed in a subfolder of C:\Program Files\Extron\Firmware.ATTENTION: The firmware file must have a .S19 extension. Other file types can cause the unit to stop functioning.7. In the Firmware Loader window, click Begin (see figure 33).The Total Progress and Progress status bars show the progress of the upload. The firmware upload to the unit may take several minutes. Once the status bars have progressed from 0% to 100%, and Status is listed as Completed, the firmware loader utility resets the unit.7Figure 33. Firmware Loader Screen8. Click Exit to close the Firmware Loader. FOXBOX SR HDMI • Remote Control35Reference InformationThis section discusses the specifications, part numbers, and accessories for the FOXBOX SR HDMI. Topics that are covered, include:• Part Numbers• Mounting the UnitPart NumbersFOXBOX SR HDMI Part NumbersThe FOXBOX receiver is available in a singlemode (SM) and multimode (MM) model:FOXBOX SR HDMIPart numberFOXBOX SR HDMI SM60-1187-22FOXBOX SR HDMI MM60-1187-21Included PartsThese items are included in each order for a FOXBOX SR HDMI receiver:Included partsPart number12V, 1A external power supply, with IEC power cord (qty. 1)*SFP Module (SM or MM, depending on the model)LockIt Lacing Bracket and tie-wrap (qty. 1)21-235-01LFCaptive screw 5-pole connectors (qty. 2)10-703-12Captive screw 3-pole connector (qty. 1)10-319-13LF10' LC-LC duplex patch cable (SM or MM, depending on the model)Rubber feet (qty. 4)Extron Software Products DVD (Signal Processing Product Control Program)FOXBOX SR HDMI Setup Guide* ZipClip 100 Mounting Kit available separately, see “Mounting Accessories,”on the next page. 36FOXBOX SR HDMI • Reference InformationMounting AccessoriesMounting KitPart NumberZipClip 100 Mounting Kit for PS Series Power Supplies (qty. 10)101-002-01RSU 126 6-inch deep 1U universal rack shelf kit60-190-10RSB 126 6-inch deep 1U basic rack shelf60-604-11RSU 129 9.5-inch deep 1U universal rack shelf kit60-190-01RSB 129 9.5-inch deep 1U basic rack shelf60-604-02MBU 125 under-desk mount kit70-077-01MBD 129 through-desk mount kit70-077-02PMK 300 projector mount kit70-374-03PMK 350 low profile projector mount kit (black, white)70-563-02, 03CablesHDMI and DVI cable assembliesAccessoryPart numberHDMI M-M Pro Series HDMI male to male cable26-650-nnHDMI M-DVI-D M/6 HDMI male to DVI-D male, 6' (1.8 m)26-614-02DVID SL Pro Series DVI-D male-to-male cable26-649-nnFiber cable assembliesMHR Mini High Resolution CablePart Number4LC MM LC to LC Multimode Fiber Optic Cable Assemblies26-652-nn2LC OM4 MM P LC to LC Laser-Optimized Multimode Fiber Optic Cable Assemblies — Plenum26-671-nn2LC SM P LC to LC Bend-Insensitive Singlemode Fiber Optic Cable Assemblies — Plenum26-670-nnBulk fiber cable and termination toolsRG6 Super High Resolution CablePart NumberOM4 MM P/2K Plenum 2 km (6,562 feet) Spool22-225-02SM P/2K Plenum 2 km (6,562 feet) Spool22-223-02Fiber Optic Termination Kit Termination Kit100-656-01QLC MM/10 Multimode, qty. 10101-018-01QLC SM/10 Singlemode, qty. 10101-017-01AdaptersAccessoriesPart numberHDMIF-DVIDM HDMI female to DVI-D male adapter26-616-01HDMIM-DVIDF HDMI male to DVI-D female adapter26-617-01FOXBOX SR HDMI • Reference Information37 Mounting the UnitATTENTION: Installation and service must be performed by authorized personnel only.Either of the 1-inch high, half-rack width unit can be placed on a tabletop, mounted on a rack shelf, mounted to a projector bracket, or mounted under or through a desk or other furniture.Tabletop UseAffix the four included rubber feet to the bottom of the unit and place it in any convenient location.MountingIf desired, mount the unit using any of the following optional kits:• RSU 126 6-inch deep universal rack shelf kit (part number 60-190-10)• RSB 126 6-inch deep basic rack shelf (part number 60-604-11)• RSU 129 9.5-inch deep universal rack shelf kit (part number 60-190-01)• RSB 129 9.5-inch deep basic rack shelf (part number 60-604-02)• MBB 100 Back of the rack mounting kit (part number 70-367-01)• MBU 125 under-desk mounting kit (part number 70-077-01)• MBD 129 through-desk mounting kit (part number 70-077-02)• PMK 300 projector mount kit (part number 70-374-01)• PMK 350 low profile projector mount kit (black, white) (part number 70-563-02, 03)Follow the instructions included with the kit.UL Guidelines for Rack MountingThe following Underwriters Laboratories (UL) guidelines pertain to the installation of a FOXBOX SR HDMI into a rack. 1. Elevated operating ambient — If installed in a closed or multi-unit rack assembly, the operating ambient temperature of the rack environment may be greater than room ambient. Therefore, consider installing the equipment in an environment compatible with the maximum ambient temperature specified by Extron (Tma = +122 °F [+50 °C]). 2. Reduced air flow — Installation of the equipment in a rack should be such that the amount of air flow required for safe operation of the equipment is not compromised.3. Mechanical loading — Mounting of the equipment in the rack should be such that a hazardous condition is not achieved due to uneven mechanical loading.4. Circuit overloading — Consideration should be given to the connection of the equipment to the supply circuit and the effect that overloading of the circuits might have on overcurrent protection and supply wiring. Appropriate consideration of equipment nameplate ratings should be used when addressing this concern.5. Reliable earthing (grounding) — Reliable earthing of rack-mounted equipment should be maintained. Particular attention should be given to supply connections other than direct connections to the branch circuit (such as the use of power strips).FOXBOX SR HDMI • Reference Information38 Extron Headquarters+1.800.633.9876 (Inside USA/Canada Only)Extron USA - West Extron USA - East +1.714.491.1500 +1.919.850.1000 +1.714.491.1517 FAX +1.919.850.1001 FAXExtron Europe+800.3987.6673 (Inside Europe Only)+31.33.453.4040 +31.33.453.4050 FAXExtron Asia+800.7339.8766 (Inside Asia Only)+65.6383.4400+65.6383.4664 FAXExtron Japan+81.3.3511.7655+81.3.3511.7656 FAXExtron China+4000.398766 Inside China Only+86.21.3760.1568 +86.21.3760.1566 FAXExtron Middle East+971.4.2991800+971.4.2991880 FAXExtron Korea+82.2.3444.1571+82.2.3444.1575 FAXExtron India1800.3070.3777 Inside India Only+91.80.3055.3777 +91.80.3055.3737 FAX© 2012 Extron Electronics All rights reserved. www.extron.comContact InformationExtron WarrantyExtron Electronics warrants this product against defects in materials and workmanship for a period of three years from the date of purchase. In the event of malfunction during the warranty period attributable directly to faulty workmanship and/or materials, Extron Electronics will, at its option, repair or replace said products or components, to whatever extent it shall deem necessary to restore said product to proper operating condition, provided that it is returned within the warranty period, with proof of purchase and description of malfunction to:USA, Canada, South America, and Central America: Extron Electronics 1001 East Ball Road Anaheim, CA 92805 U.S.A. Japan: Extron Electronics, Japan Kyodo Building, 16 Ichibancho Chiyoda-ku, Tokyo 102-0082 JapanEurope and Africa: Extron Europe Hanzeboulevard 10 3825 PH Amersfoort The NetherlandsChina: Extron China 686 Ronghua Road Songjiang District Shanghai 201611 ChinaAsia: Extron Asia 135 Joo Seng Road, #04-01 PM Industrial Bldg. Singapore 368363 SingaporeMiddle East: Extron Middle East Dubai Airport Free Zone F12, PO Box 293666 United Arab Emirates, DubaiThis Limited Warranty does not apply if the fault has been caused by misuse, improper handling care, electrical or mechanical abuse, abnormal operating conditions, or if modifications were made to the product that were not authorized by Extron.NOTE: If a product is defective, please call Extron and ask for an Application Engineer to receive an RA (Return Authorization) number. This will begin the repair process. USA: 714.491.1500 or 800.633.9876 Europe: 31.33.453.4040 Asia: 65.6383.4400 Japan: 81.3.3511.7655 Units must be returned insured, with shipping charges prepaid. If not insured, you assume the risk of loss or damage during shipment. Returned units must include the serial number and a description of the problem, as well as the name of the person to contact in case there are any questions. Extron Electronics makes no further warranties either expressed or implied with respect to the product and its quality, performance, merchantability, or fitness for any particular use. In no event will Extron Electronics be liable for direct, indirect, or consequential damages resulting from any defect in this product even if Extron Electronics has been advised of such damage.Please note that laws vary from state to state and country to country, and that some provisions of this warranty may not apply to you. \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Approved_Document_B__fire_safety__volume_2_-_Buildings_other_than_dwellings__2019_edition_incorporating_2020_and_2022_amendments.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/Approved_Document_B__fire_safety__volume_2_-_Buildings_other_than_dwellings__2019_edition_incorporating_2020_and_2022_amendments.txt new file mode 100644 index 000000000..c3ff00d7f --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/Approved_Document_B__fire_safety__volume_2_-_Buildings_other_than_dwellings__2019_edition_incorporating_2020_and_2022_amendments.txt @@ -0,0 +1 @@ +Volume 2: Buildings other than dwellingsRequirement B1: Means of warning and escapeRequirement B2: Internal fire spread (linings)Requirement B3: Internal fire spread (structure)Requirement B4: External fire spreadRequirement B5: Access and facilities for the fire service Regulations: 6(3), 7(2) and 38APPROVED DOCUMENTBFire safety The Building Regulations 2010 2019 edition incorporating 2020 and 2022 amendments – for use in England ONLINE VERSIONONLINE VERSIONMain changes made by the 2020 amendmentsThe changes focus on the following fire safety provisions in blocks of flats (Volume 1):a. Sprinklers: A reduction in the trigger height from 30m to 11m.b. Wayfinding signage for the fire service: A new recommendation for floor identification and flat indication signage within blocks of flats with storeys over 11m.In addition a typographical error is corrected in both volumes. Purpose group number 2 is now included in reference to ‘residential’ buildings in the guidance on boundaries.The changes are set out in the May 2020 AD B amendments. Main changes made by the 2022 amendmentsThe changes focus on the following fire safety provisions: a. Ban of combustible materials in and on the external walls of buildings: Consequential amendments following the laying of the Building (Amendment) (England) Regulations 2022. Updated provisions in Section 12 for residential buildings (purpose groups 1 and 2) with a storey 11m or more in height. b. Clarifications and corrections: Clarification of further diagrams, further text clarifications and corrections. The changes are set out in the June 2022 AD B amendment booklet and the November 2022 correction notice.ONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition iIntroductionWhat is an approved document?Approved documents are approved by the Secretary of State and give practical guidance on common building situations about how to meet the requirements of the Building Regulations 2010 for England. Different approved documents give guidance on each of the technical parts of the regulations. These are all listed in the back of the approved documents. In addition to guidance, some approved documents include provisions that must be followed exactly, as required by regulations or where methods of test or calculation are approved by the Secretary of State. Each approved document covers the requirements of the Building Regulations 2010 relating to a different aspect of building work. Building work must also comply with all other applicable requirements of the Building Regulations 2010 and all other applicable legislation.How is construction regulated in England?Most building work being carried out in England must comply with the Building Regulations 2010. The Building Regulations are made under powers in the Building Act 1984. Building Regulations protect the health and safety of people in and around buildings, they also provide for energy and water conservation and access to and use of buildings.The Manual to the Building Regulations (references to this in the introduction are taken from the first edition) gives an overview of the building regulatory system in England. You can access the most recent version of the manual at: www.gov.uk/guidance/building-regulations-and-approved-documents-index. How do you comply with the Building Regulations?Building work must meet all relevant requirements of the Building Regulations. To comply with the Building Regulations, it is necessary both to follow the correct procedures and meet technical performance requirements. The approved documents set out what, in ordinary circumstances, may be accepted as one way to comply with the Building Regulations. Note, however, that:• Complying with the guidance in the approved documents does not guarantee that building work complies with the requirements of the regulations – the approved documents cannot cover all circumstances. Those responsible for building work must consider whether following the guidance in the approved documents is likely to meet the requirements in the particular circumstances of their case. • There may be other ways to comply with the requirements than those described in an approved document. If those responsible for meeting the requirements prefer to meet a requirement in some other way than described in an approved document, they should seek to agree this with the relevant building control body at an early stage. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONii Approved Document B Volume 2, 2019 edition Building Regulations 2010Those responsible for building work include agents, designers, builders, installers and the building owner. For further information, see Chapter 7 in Volume 1 and paragraphs A26, B2 and F2 in Volume 2 of the Manual to the Building Regulations. The Building Regulations can be contravened by not following the correct procedures or not meeting the technical performance requirements. If the building owner or those responsible for the works contravene the Building Regulations, the local authority may prosecute them in the magistrates’ court. For further information on enforcement and sanctions in the existing system, see Chapter B in Volume 2 of the Manual to the Building Regulations. What do the Building Regulations cover?‘Building work’ is a legal term for work covered by the Building Regulations. Where a building is not exempt, the Building Regulations apply to all types of building work as defined in regulation 3 of the Building Regulations. For further information, what constitutes building work is covered in Chapter A, Volume 2 of the Manual to the Building Regulations. The Building Regulations contain sections dealing with definitions, procedures and the expected technical performance of building work. For example, the Building Regulations:a. define what types of building, plumbing and heating work are classed as building work in regulation 3 (for further information see paragraphs A14 to A16 in Volume 2 of the Manual to the Building Regulations).b. specify types of building that are exempt from the Building Regulations (for further information see Table A1 and paragraph A11 in Volume 2 of the Manual to the Building Regulations).c. set out the notification procedures to follow when undertaking building work (for further information see Figure 2.1 in Volume 1 of the Manual to the Building Regulations). d. set out the technical requirements (see Table 7.1 in Volume 1 of the Manual to the Building Regulations) with which the individual aspects of building design and construction must comply in the interests of the health and safety of building users, of energy efficiency (for further information see paragraphs A12(d)–(f), A14(f)–(h), A22, A23, B2(c) and F24 in Volume 2 of the Manual to the Building Regulations), and of access to and use of buildings.e. set out the standards for building materials and workmanship in carrying out building work (for further information see Chapter 7 in Volume 1, and paragraphs F8 to F11 in Volume 2 of the Manual to the Building Regulations).When must a building control body be notified?It is often necessary to notify a building control body of planned building work. To help ensure that work complies with the Building Regulations, those responsible for building work may need to use one of the two types of building control body listed below:a. a local authority building control body (for further information see Chapter B in Volume 2 of the Manual to the Building Regulations)b. an approved inspector (for further information see Chapter E in Volume 2 of the Manual to the Building Regulations). ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition iiiIf building work consists only of installing certain types of services or fittings (e.g. fuel-burning appliances or replacement windows) and the building owner employs an installer that is registered with a relevant competent person scheme designated in the regulations, a building control body does not need to be notified. Third party schemes of certification and accreditation of installers can provide confidence that the required level of performance for a system, product, component or structure can be achieved. Building control bodies may accept certification under such schemes as evidence of compliance with a relevant standard. However, a building control body should establish before the start of the building work that a scheme is adequate for the purposes of the Building Regulations.For further information about third party certification schemes and competent person schemes, see Chapter 5 in Volume 1 and Chapter C in Volume 2 of the Manual to the Building Regulations.How to use this approved document Each approved document contains:• general guidance on the performance expected of materials and building work in order to comply with each of the requirements of the Building Regulations, and • practical examples and solutions on how to achieve compliance for some of the more common building situations. They may not provide appropriate guidance if the case is unusual in terms of its design, setting, use, scale or technology. Non-standard conditions may include any of the following: • difficult ground conditions • buildings with unusual occupancies or high levels of complexity • very large or very tall buildings • large timber buildings • some buildings that incorporate modern construction methods. Anyone using the approved documents should have sufficient knowledge and skills to understand the guidance and correctly apply it to the building work. This is important because simply following the guidance does not guarantee that your building work will comply with the legal requirements of the Building Regulations. Each approved document contains legal requirements (which you must follow) and guidance (which you may or may not choose to follow). The text in a box with a green background at the beginning of each section of an approved document is taken from the Building Regulations. This text sets out the legal requirements. The explanation which follows the legal requirements is guidance (see Diagram i below). The guidance then explains one or more ways to demonstrate how building work can be shown to comply with the legal requirements in common circumstances. The terms in green lettering in an approved document are key terms, listed and explained in the appendix to that approved document. Guidance in the approved documents addresses most, but not all, situations that building owners will face. Situations may arise that are not covered. You or your advisers will need to carefully consider whether following the guidance will mean that the requirements of the Building Regulations will be met.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONiv Approved Document B Volume 2, 2019 edition Building Regulations 2010B2Requirement B2: Internal fire spread (linings)This section deals with the following requirement from Part B of Schedule 1 to the Building Regulations 2010.RequirementRequirementLimits on applicationInternal fire spread (linings)B2. (1) To inhibit the spread of fire within the building, the internal linings shall— (a) adequately resist the spread of flame over their surfaces; and (b) have, if ignited, either a rate of heat release or a rate of fire growth, which is reasonable in the circumstances. (2) In this paragraph “internal linings” means the materials or products used in lining any partition, wall, ceiling or other internal structure.IntentionIn the Secretary of State’s view, requirement B2 is met by achieving a restricted spread of flame over internal linings. The building fabric should make a limited contribution to fire growth, including a low rate of heat release.It is particularly important in circulation spaces, where linings may offer the main means by which fire spreads and where rapid spread is most likely to prevent occupants from escaping.Requirement B2 does not include guidance on the following.a. Generation of smoke and fumes.b. The upper surfaces of floors and stairs.c. Furniture and fittings.➊➋Key➊ The law: extract from the Building Regulations 2010.➋ Statutory guidance.Diagram i The relationship between regulations and guidance in the approved documentsFor further information about the use of technical guidance, see Chapter 7 in Volume 1 and Chapter F in Volume 2 of the Manual to the Building Regulations.Where to get further helpIf you are unsure whether you have the knowledge and skills to apply the guidance correctly, or if you do not understand the technical guidance or other information in this approved document or the additional detailed technical references to which it directs you, you should seek further help. Some sources of help are listed below. a. Your building control body may be able to help in many cases. b. If you are registered with a competent person scheme, the scheme operator should be in a position to help.c. Suitably qualified and experienced construction professionals should also be engaged where necessary. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition vContentsIntroduction iWhat is an approved document? iHow is construction regulated in England? iHow do you comply with the Building Regulations? iWhat do the Building Regulations cover? iiWhen must a building control body be notified? iiHow to use this approved document iiiWhere to get further help ivSection 0: Approved Document B: Fire safety – buildings other than dwellings 1Summary 1Arrangement of sections 1Management of premises 2Property protection 2Inclusive design 2Alternative approaches 3Purpose groups 5Mixed use buildings 7Requirement B1: Means of warning and escape 8Intention 8Section 1: Fire detection and alarm systems 9General provisions 9Fire detection and alarm systems 9Design and installation of systems 11Section 2: Design for horizontal escape 12Introduction 12Escape route design 12Residential care homes 25Section 3: Design for vertical escape 28Introduction 28Number of escape stairs 28Provision of refuges 29Width of escape stairs 30Design and protection of escape stairs 36ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONvi Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 4: Small premises 42Construction 42Travel distance and number of escape routes 42Escape stairs in small premises 46Section 5: General provisions 47Introduction 47Protection of escape routes 47Doors on escape routes 47General provisions 49Lifts 51Refuse chutes and storage 52Shop store rooms 53Requirement B2: Internal fire spread (linings) 54Intention 54Section 6: Wall and ceiling linings 55Classification of linings 55Thermoplastic materials 57Requirement B3: Internal fire spread (structure) 61Intention 62Section 7: Loadbearing elements of structure 63Fire resistance standard 63Raised storage areas 64Section 8: Compartmentation/sprinklers 65Provision of compartmentation 65Sprinklers 69Construction of compartment walls and compartment floors 69Openings in compartmentation 72Protected shafts 72Section 9: Cavities 76Provision of cavity barriers 77Pathways around fire-separating elements 77Extensive cavities 79Construction and fixings for cavity barriers 80Section 10: Protection of openings and fire‑stopping 82Introduction 82Openings for pipes 82Mechanical ventilation and air-conditioning systems 83ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition viiFlues, etc. 87Fire-stopping 87Section 11: Special provisions for car parks 89Requirement B4: External fire spread 91Intention 93Section 12: Resisting fire spread over external walls 94Introduction 94Combustibility of external walls 94Balconies 96Metal composite materials 97Regulation 7(2) and requirement B4 97Section 13: Resisting fire spread from one building to another 99Introduction 99Boundaries 99Unprotected areas and fire resistance 102Methods for calculating acceptable unprotected area 105Section 14: Resisting fire spread over roof coverings 107Introduction 107Separation distances 107Requirement B5: Access and facilities for the fire service 110Intention 110Section 15: Vehicle access 111Buildings not fitted with fire mains 111Buildings fitted with fire mains 113Design of access routes and hardstandings 113Section 16: Fire mains and hydrants 116Introduction 116Provision of fire mains 116Design and construction of fire mains 116Provision of private hydrants 117Section 17: Access to buildings for firefighting personnel 118Introduction 118Provision of firefighting shafts 119Location of firefighting shafts 120Design and construction of firefighting shafts 122Rolling shutters in compartment walls 122ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONviii Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 18: Venting of heat and smoke from basements 123Provision of smoke outlets 123Construction of outlet ducts or shafts 125Basement car parks 125Regulation 38: Fire safety information 126Intention 126Section 19: Fire safety information 127Essential information 127Additional information for complex buildings 128Appendix A: Key terms 130Appendix B: Performance of materials, products and structures 136Introduction 136Reaction to fire 137National classifications for reaction to fire 137Thermoplastic materials 138Roofs 139Fire resistance 140Application of the fire resistance standards in Table B4 148Appendix C: Fire doorsets 151Appendix D: Methods of measurement 155Occupant number 155Travel distance 157Width 157Building dimensions 158Free area of smoke ventilators 161Appendix E: Sprinklers 162Sprinkler systems 162Design of sprinkler systems 163Water supplies and pumps 163Appendix F: Standards referred to 164European Standards 164British Standards 165Appendix G: Documents referred to 167Legislation 167Other documents 167Index 169ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 1Section 0: Approved Document B: Fire safety – buildings other than dwellingsSummary0.1 This approved document has been published in two volumes. Volume 1 deals solely with dwellings, including blocks of flats, while Volume 2 deals with all other types of building covered by the Building Regulations.Arrangement of sections0.2 Requirements B1–B5 of Schedule 1 to the Building Regulations are dealt with separately in one or more sections. Each requirement is shown at the start of the relevant sections. 0.3 The provisions in this document have the following aims:Requirement B1: When there is a fire, ensure both:a. satisfactory means of sounding an alarmb. satisfactory means of escape for people.Requirement B2: Inhibit the spread of fire over internal linings of buildings.Requirement B3: The building must be built such that all of the following are achieved in the event of a fire:a. the premature collapse of the building is avoidedb. sufficient fire separation is provided within buildings and between adjoining buildingsc. automatic fire suppression is provided where necessaryd. the unseen spread of fire and smoke in cavities is restricted. Requirement B4: Restrict both:a. the potential for fire to spread over external walls and roofs (including compliance with regulations 6(4) and 7(2))b. the spread of fire from one building to another.Requirement B5: Ensure both:a. satisfactory access for the fire service and its appliancesb. facilities in buildings to help firefighters save the lives of people in and around buildings.Regulation 38: Provide fire safety information to building owners.0.4 Guidance is given on each aspect separately, though many are closely interlinked. The document should be considered as a whole. The relationship between different requirements and their interdependency should be recognised. Particular attention should be given to the situation where one part of the guidance is not fully followed as this could have a negative effect on other provisions.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION2 Approved Document B Volume 2, 2019 edition Building Regulations 2010Appendices: Information common to more than one requirement of Part B0.5 Guidance on matters that refer to more than one section of this document can be found in the following appendices.Appendix A: Key termsAppendix B: Performance of materials, products and structuresAppendix C: Fire doorsetsAppendix D: Methods of measurementAppendix E: SprinklersAppendix F: Standards referred toAppendix G: Documents referred toManagement of premises0.6 The Building Regulations do not impose any requirements on the management of a building, but do assume that it will be properly managed. This includes, for example, keeping protected escape routes virtually ‘fire sterile’.Appropriate fire safety design considers the way in which a building will be managed. Any reliance on an unrealistic or unsustainable management regime cannot be considered to have met the requirements of the regulations.Once the building is in use, the management regime should be maintained and a suitable risk assessment undertaken for any variation in that regime. Failure to take proper management responsibility may result in the prosecution of an employer, building owner or occupier under legislation such as the Regulatory Reform (Fire Safety) Order 2005.Property protection0.7 The Building Regulations are intended to ensure a reasonable standard of life safety in a fire. The protection of property, including the building itself, often requires additional measures. Insurers usually set higher standards before accepting the insurance risk.Many insurers use the RISCAuthority Design Guide for the Fire Protection of Buildings by the Fire Protection Association (FPA) as a basis for providing guidance to the building designer on what they require.Further information on the protection of property can be obtained from the FPA website: www.thefpa.co.uk.Inclusive design0.8 The fire safety aspects of the Building Regulations aim to achieve reasonable standards of health and safety for people in and around buildings. People, regardless of ability, age or gender, should be able to access buildings and use their facilities. The fire safety measures incorporated into a building should take account of the needs of everyone who may access the building, both as visitors and as people who live or work in it. It is not appropriate, except in exceptional circumstances, to assume that certain groups of people will be excluded from a building because of its use.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 3The provisions in this approved document are considered to be of a reasonable standard for most buildings. However, some people’s specific needs might not be addressed. In some situations, additional measures may be needed to accommodate these needs. This should be done on a case-by-case basis.Alternative approaches0.9 The fire safety requirements of the Building Regulations will probably be satisfied by following the relevant guidance in this approved document. However, approved documents provide guidance for some common building situations and there may be alternative methods of complying with the Building Regulations’ requirements.If alternative methods are adopted, the overall level of safety should not be lower than the approved document provides. It is the responsibility of those undertaking the work to demonstrate compliance. If other standards or guidance documents are adopted, the relevant fire safety recommendations in those publications should be followed in their entirety. However, in some circumstances it may be necessary to use one publication to supplement another. Care must be taken when using supplementary guidance to ensure that an integrated approach is used in any one building.Guidance documents intended specifically for assessing fire safety in existing buildings often include less onerous provisions than those for new buildings and are therefore unlikely to be appropriate for building work that is controlled by the Building Regulations.Buildings for industrial and commercial activities that present a special fire hazard, e.g. those that sell fuels, may require additional fire precautions to those in this approved document.Health care premises0.10 Health care premises and the patients who use them are diverse. Patients using the premises require different types of care to suit their specific needs. The choice of fire safety strategy depends on both of the following.a. How a building is designed, furnished, staffed and managed.b. The needs of the patients.The Department of Health (DoH) guidance documents on fire precautions in health care buildings, Firecode, take account of the particular characteristics of these buildings and should be followed. Firecode contains managerial and other fire safety provisions that are outside the scope of the Building Regulations.Unsupervised group homes0.11 An unsupervised group home for not more than six mental health service users should be regarded as having a purpose group of either of the following.a. An existing house of one or two storeys for which the means of escape are provided in accordance with DoH HTM 88 should be regarded as a purpose group 1(c) building.b. A new building may be more appropriately regarded as being in purpose group 2(b).Shopping complexes0.12 Although the guidance in this document may be readily applied to individual shops, shopping complexes present different escape problems. The design of units within a shopping complex should be compatible with the fire strategy for the complex as a whole. A suitable approach is given in Annex E of BS 9999.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION4 Approved Document B Volume 2, 2019 edition Building Regulations 2010Assembly buildings0.13 Assembly buildings where a large number of people are present require additional considerations for means of escape; for example, fixed seating may limit the ability of people to escape.Guidance on fixed seating and other aspects of means of escape in assembly buildings is given in Annex D of BS 9999. For buildings to which the Safety of Sports Grounds Act 1975 applies, the Sports Grounds Safety Authority’s Guide to Safety at Sports Grounds should also be followed.Schools0.14 The design of fire safety in schools is covered by Building Bulletin 100, which should be used. Building Bulletin 100 contains fire safety provisions that are outside the scope of the Building Regulations.Prisons provided under section 33 of the Prisons Act 19520.15 Prisons are exempted from the functional requirements of Parts B1 to B5 of the Building Regulations under section 33 of the Prisons Act 1952. It is usual that prisons should comply with the fire safety requirements of the Building Regulations, except where the requirements are incompatible with safe custody, good order or security. HM Prison and Probation Service (HMPPS) provides guidance documents on fire precautions in prisons, which take account of the public safety need to secure doors and exits while maintaining life safety objectives. The HMPPS Custodial Premises Fire Safety Design Guide (FSDG) is the design standard for fire safety in prisons, providing structured guidance for those involved in the planning, designing or approval of new or altered buildings. Further guidance documents on fire safety in prisons are provided by HMPPS. These documents may also be used for other places of lawful detention. Buildings containing one or more atria0.16 A building with an atrium that passes through compartment floors may need special fire safety measures. Guidance is given in Annexes B and C of BS 9999. Buildings of special architectural or historic interest0.17 Where Part B applies to existing buildings, particularly buildings of special architectural or historic interest for which the guidance in this document might prove too restrictive, some variation of the provisions in this document may be appropriate. In such cases, it is appropriate to assess the hazard and risk in the particular case and consider a range of fire safety features in that context.Fire safety engineering0.18 Fire safety engineering might provide an alternative approach to fire safety. Fire safety engineering may be the only practical way to achieve a satisfactory standard of fire safety in some complex buildings and in buildings that contain different uses.Fire safety engineering may also be suitable for solving a specific problem with a design that otherwise follows the provisions in this document.0.19 BS 7974 and supporting published documents (PDs) provide a framework for and guidance on the application of fire safety engineering principles to the design of buildings.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 5Purpose groups0.20 Building uses are classified within different purpose groups, which represent different levels of hazard (see Table 0.1). A purpose group can apply to a whole building or to a compartment within the building, and should relate to the main use of the building or compartment.0.21 Where a building or compartment has more than one use, it is appropriate to assign each different use to its own purpose group in the following situations.a. If the ancillary use is a flat.b. If both of the following apply.i. The building or compartment has an area of more than 280m2.ii. The ancillary use relates to an area that is more than one-fifth of the total floor area of the building or compartment.c. In ‘shop and commercial’ (purpose group 4) buildings or compartments, if the ancillary use is storage and both of the following apply.i. The building or compartment has an area of more than 280m2.ii. The storage area comprises more than one-third of the total floor area of the building or compartment.0.22 Where there are multiple main uses that are not ancillary to one another (for example, shops with independent offices above), each use should be assigned to a purpose group in its own right. Where there is doubt as to which purpose group is appropriate, the more onerous guidance should be applied. Table 0.1 Classification of purpose groupsVolume 1 purpose groupsTitle GroupPurpose for which the building or compartment of a building is intended to be usedResidential (dwellings)1(a)(1)Flat.1(b)(2)Dwellinghouse that contains a habitable storey with a floor level a minimum of 4.5m above ground level up to a maximum of 18m.(3) 1(c)(2)(4)Dwellinghouse that does not contain a habitable storey with a floor level a minimum of 4.5m above ground level.Volume 2 purpose groupsResidential (institutional)2(a)Hospital, home, school or other similar establishment, where people sleep on the premises. The building may be either of the following: • Living accommodation for, or accommodation for the treatment, care or maintenance of, either: - disabled people with a range of impairments including physical, sensory and cognitive impairments, or mental health conditions- people under the age of 5 years. • A place of lawful detention.Residential (other)2(b)Hotel, boarding house, residential college, hall of residence, hostel or any other residential purpose not described above.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION6 Approved Document B Volume 2, 2019 edition Building Regulations 2010Table 0.1 ContinuedTitle GroupPurpose for which the building or compartment of a building is intended to be usedOffice3Offices or premises used for any of the following and their control: • administration• clerical work (including writing, bookkeeping, sorting papers, filing, typing, duplicating, machine calculating, drawing and the editorial preparation of matter for publication, police and fire and rescue service work)• handling money (including banking and building society work)• communications (including postal, telegraph and radio communications) • radio, television, film, audio or video recording• performance (premises not open to the public).Shop and commercial4Shops or premises used for either of the following. • A retail trade or business (including selling food or drink to the public for immediate consumption, retail by auction, self-selection and over-the-counter wholesale trading, the business of lending books or periodicals for gain, the business of a barber or hairdresser, and the rental of storage space to the public). • Premises to which the public are invited either:– to deliver or collect goods in connection with their hire, repair or other treatment – (except in the case of repair of motor vehicles) where the public themselves may carry out such repairs or other treatments.Assembly and recreation5Place of assembly, entertainment or recreation, including any of the following: • bingo halls, broadcasting, recording and film studios open to the public, casinos, dance halls• entertainment, conference, exhibition and leisure centres• funfairs and amusement arcades• museums and art galleries, non-residential clubs, theatres, cinemas, concert halls• educational establishments, dancing schools, gymnasia, swimming pool buildings, riding schools, skating rinks, sports pavilions, sports stadia• law courts• churches and other buildings of worship, crematoria• libraries open to the public, non-residential day centres, clinics, health centres and surgeries • passenger stations and termini for air, rail, road or sea travel• public toilets • zoos and menageries.Industrial6Factories and other premises used for any of the following: • manufacturing, altering, repairing, cleaning, washing, breaking up, adapting or processing any article• generating power • slaughtering livestock.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 7Table 0.1 ContinuedTitle GroupPurpose for which the building or compartment of a building is intended to be usedStorage and other non-residential(4)7(a)Either of the following:• place (other than described under 7(b)) for the storage or deposit of goods or materials • any building not within purpose groups 1 to 6.7(b)Car parks designed to admit and accommodate only cars, motorcycles and passenger or light goods vehicles that weigh a maximum of 2500kg gross.NOTES:This table only applies to Part B. See Approved Document B Volume 1 for guidance on dwellings (purpose group 1).1. Includes live/work units that meet the provisions of Approved Document B Volume 1, paragraph 3.24.2. Includes any surgeries, consulting rooms, offices or other accommodation that meets all of the following conditions. a. A maximum of 50m2 in total.b. Part of a dwellinghouse.c. Used by an occupant of the dwellinghouse in a professional or business capacity. 3. Where very large (over 18m in height or with a 10m deep basement) or unusual dwellinghouses are proposed, some of the guidance for buildings other than dwellings may be needed.4. All of the following are included in purpose group 1(c).a. A detached garage a maximum of 40m2 in area.b. A detached open carport a maximum of 40m2 in area.c. A detached building that consists of a garage and open carport, each a maximum of 40m2 in area.Mixed use buildings0.23 This approved document includes reference to selected guidance for dwellings. For the design of mixed use buildings which include dwellings, Approved Document B Volume 1 should be consulted in addition to the guidance contained in this approved document. 0.24 Where a complex mix of uses exists, the effect that one use may have on another in terms of risk should be considered. It could be necessary to use guidance from both volumes, apply other guidance (such as from HTM 05-02 or Building Bulletin 100), and/or apply special measures to reduce the risk.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB18 Approved Document B Volume 2, 2019 edition Building Regulations 2010Requirement B1: Means of warning and escapeThese sections deal with the following requirement from Part B of Schedule 1 to the Building Regulations 2010.RequirementRequirementLimits on applicationMeans of warning and escapeB1. The building shall be designed and constructed so that there are appropriate provisions for the early warning of fire, and appropriate means of escape in case of fire from the building to a place of safety outside the building capable of being safely and effectively used at all material times.Requirement B1 does not apply to any prison provided under section 33 of the Prison Act 1952(a) (power to provide prisons, etc.). (a) 1952 c. 52; section 33 was amended by section 100 of the Criminal Justice and Public Order Act 1994 (c. 33) and by S.I. 1963/597.IntentionIn the Secretary of State’s view, requirement B1 is met by achieving all of the following.a. There are sufficient means for giving early warning of fire to people in the building.b. All people can escape to a place of safety without external assistance.c. Escape routes are suitably located, sufficient in number and of adequate capacity.d. Where necessary, escape routes are sufficiently protected from the effects of fire and smoke.e. Escape routes are adequately lit and exits are suitably signed.f. There are appropriate provisions to limit the ingress of smoke to the escape routes, or to restrict the spread of fire and remove smoke.The extent to which any of these measures are necessary is dependent on the use of the building, its size and its height.Building work and material changes of use subject to requirement B1 include both new and existing buildings. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB1Building Regulations 2010 Approved Document B Volume 2, 2019 edition 9Section 1: Fire detection and alarm systemsGeneral provisions1.1 All buildings should have arrangements for detecting fire and raising the alarm. In most buildings, fires are detected by people, either by sight or smell, and therefore often nothing more is needed. 1.2 In some small buildings/premises, the means of raising the alarm may be simple (for example, a shouted warning). In assessing appropriate solutions, warnings need to be heard and understood throughout the premises.Fire detection and alarm systems1.3 Other than for some small buildings/premises, an electrically operated fire alarm system should be provided. In some situations, the alarm should be operated by a fire detection system. The detailed specification should be compatible with the fire strategy for the building.NOTE: The term ‘fire alarm system’ describes the combination of components for giving an audible and/or other perceptible warning of fire.NOTE: In this document, the term ‘fire detection system’ describes any type of automatic sensor network and associated control and indicating equipment. Sensors may be sensitive to smoke, heat, gaseous combustion products or radiation. Automatic sprinkler systems can also be used to operate a fire alarm system.1.4 In ‘residential (institutional)’ and ‘residential (other)’ occupancies (purpose groups 2(a) and 2(b)), automatic fire detection and alarms should be provided.1.5 Automatic fire detection and alarm systems should be provided in non-residential occupancies where a fire could break out in an unoccupied part of the premises (e.g. a storage area or a part of the building that is not visited on a regular basis) and prejudice the means of escape from occupied part(s) of the premises.1.6 Automatic fire detection will also be necessary where fire protection systems, such as pressure differential systems or door releases, need to operate automatically. 1.7 Every building design should be assessed individually. General guidance on the category of fire detection system that may need to be provided within a building can be found in Table A1 of BS 5839-1. 1.8 Where an electrically operated fire detection and alarm system is provided, it should comply with BS 5839-1.1.9 BS 5839-1 specifies three categories of system.a. Category L – for the protection of life.b. Category M – manual fire detection and alarm systems.c. Category P – for property protection. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION10 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Category L systems are divided into the following.L1 – systems installed throughout the protected building.L2 – systems installed only in defined parts of the protected building (a category L2 system will normally include the coverage required of a category L3 system).L3 – systems designed to warn of fire at an early enough stage to enable all occupants, other than possibly those in the room where the fire started, to escape safely before the escape routes become impassable because of fire, smoke or toxic gases.L4 – systems installed within those parts of the escape routes that comprise circulation areas and circulation spaces, such as corridors and stairs.L5 – systems in which the protected area(s) and/or the location of detectors are designed to satisfy a specific fire safety objective (other than that of a category L1, L2, L3 or L4 system).Type P systems are divided into the following.P1 – systems installed throughout the protected building.P2 – systems installed only in defined parts of the protected building.1.10 Electrical alarm system call points should comply with either of the following.a. BS 5839-2. b. BS EN 54-11 Type A (direct operation). Call points should be installed in accordance with BS 5839-1. Type B (indirect operation) call points of BS EN 54-11 should only be used with the approval of the building control body.1.11 A voice alarm system complying with BS 5839-8, and giving a fire warning different from other signals in general use, may be considered if either of the following applies.a. People might not respond quickly to a fire warning.b. People are unfamiliar with the fire warning arrangements.1.12 In premises where lots of members of the public are present, an initial general alarm may be undesirable. Any fire alarm system that first alerts staff should comply with BS 5839-1.1.13 Where the escape strategy is based on simultaneous evacuation, actuation of the fire alarm system should give warning from all fire alarm sounders. Where phased evacuation is planned, a staged alarm system is appropriate. See paragraph 3.21.1.14 BS 9999 provides guidance for fire detection and alarm systems in buildings containing atria. Warnings for people with impaired hearing1.15 Clause 18 of BS 5839-1 gives detailed guidance on the design and selection of fire alarm warnings for people with impaired hearing. In buildings or part of a building where people may be in relative isolation, a visual and audible fire alarm may be the most appropriate solution. In buildings where the population is managed, a vibrating personal paging system may be more appropriate.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 11B1Design and installation of systems1.16 Fire detection and alarm systems must be properly designed, installed and maintained. A design, installation and commissioning certificate should be provided for fire detection and alarm systems. Third party certification schemes for fire protection products and related services are an effective means of providing assurances of quality, reliability and safety.Interface between fire detection and alarm systems and other systems1.17 Fire detection and alarm systems sometimes trigger other systems. The interface between systems must be reliable. Particular care should be taken if the interface is facilitated via another system. Where any part of BS 7273 applies to the triggering of other systems, the recommendations of that part of BS 7273 should be followed.Student accommodation 1.18 In student residences that are designed and occupied as a block of flats, separate automatic detection should be provided in each self-contained flat where all of the following apply. a. A group of up to six students shares the flat. b. Each flat has its own entrance door. c. The compartmentation principles for flats in Section 7 of Approved Document B Volume 1 have been followed. Where a total evacuation strategy is adopted, the alarm system should follow the guidance elsewhere in this section.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB112 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Section 2: Design for horizontal escape Introduction2.1 Means of escape should be provided from any point on a storey to the storey exit, for all types of building. The general principle is that any person confronted by a fire within a building can turn away from it and escape safely.2.2 For small shop, office, industrial, storage and other similar premises, the guidance on small premises (see section 4) may be followed instead of the provisions in this section, if they meet both of the following conditions.a. No storey has an area more than 280m2.b. There is a maximum of two storeys plus a basement storey.Escape route designNumber of escape routes and exits2.3 The number of escape routes and exits that should be provided depends on both of the following.a. The number of occupants in the room, tier or storey.b. The limits on travel distance to the nearest exit given in Table 2.1 (which apply only to the nearest exit; other exits may be further away).2.4 In multi-storey buildings, if more than one stair is needed for vertical escape, every part of each storey should have access to more than one stair. An area may be in a dead end provided the alternative stair is accessible.2.5 In mixed use buildings, separate means of escape should be provided from any storeys or parts of storeys used for the ‘residential’ or ‘assembly and recreation’ purpose groups (purpose groups 1, 2 and 5).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 13B1B1Single escape routes and exits2.6 A single escape route is acceptable for either of the following.a. Parts of a floor from which a storey exit can be reached within the limit for travel distance in one direction shown in Table 2.1 (see also paragraph 2.8), provided the following apply.i. For places of assembly and bars, no one room in this situation has more than 60 people.ii. For ‘residential (institutional)’ buildings (purpose group 2(a)), no one room in this situation has more than 30 people. Occupant number calculations are described in Appendix D.b. A storey with no more than 60 people, where the limits on travel distance in one direction only are satisfied (see Table 2.1).2.7 In many cases, the beginning of a route will not have an alternative escape route (for example, a single exit from a room into a corridor where escape is possible in two directions). This is acceptable if both of the following apply. a. The travel distance to the nearest storey exit is within the limits for routes where escape is possible in more than one direction (Table 2.1).b. The travel distance for the ‘one direction only’ section of the route does not exceed the limit for travel distance where there is no alternative escape route (Table 2.1).Diagram 2.1 shows how to measure travel distances from a dead end in an open storey layout.See para 2.745° min.ABCDTravel distance in a dead-end conditionshould meet all of the following.a. Angle ABD should be at least 45 degrees.b. Distance CBA or CBD (whichever is less) should be no more than the maximum travel distance given for alternative escape routes.c. Distance CB should be no more than the maximum travel distance where there are no alternative escape routes.ExitExitSee para 2.7Diagram 2.1 Travel distance in dead-end conditionONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION14 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Table 2.1 Limitations on travel distanceMaximum travel distance(1) where travel is possible in:Purpose group Use of the premises or part of the premisesOne direction only (m)More than one direction (m)2(a) Residential (institutional)9 182(b) Residential (other): a. in bedrooms(2)918b. in bedroom corridors935c. elsewhere18353Office18454Shop and commercial18 455Assembly and recreation:a. buildings primarily for disabled people918b. areas with seating in rows1532c. elsewhere18456 Industrial(3)Normal hazard25 45Higher hazard12 257 Storage and other non-residential(3)Normal hazard25 45Higher hazard12 252–7 Place of special fire hazard(4) 9(5) 18(5)2–7Plant room or roof-top plant:a. distance within the room935b. escape route not in open air (overall travel distance)1845c. escape route in open air (overall travel distance)60100NOTES:1. If the internal layout of partitions, fittings, etc. is not known, direct distances, rather than travel distances, should be assessed. The direct distance should be assumed to be two-thirds of the actual travel distance.2. Maximum part of travel distance within the room. This limit applies within the bedroom and any associated dressing room, bathroom or sitting room, etc. The distance is measured to the door to the protected corridor that serves the room or suite. Sub-item (b) applies from that point along the bedroom corridor to a storey exit.3. In industrial and storage buildings, the appropriate travel distance depends on the level of fire hazard associated with the processes and materials being used. Higher hazard includes manufacturing, processing or storage of significant amounts of hazardous goods or materials, including any of the following. • Any compressed, liquefied or dissolved gas.• Any substance that becomes dangerous by interaction with either air or water.• Any liquid substance with a flash point below 65°C, including whisky or other alcoholic liquor.• Any corrosive substance.• Any oxidising agent.• Any substance liable to spontaneous combustion.• Any substance that changes or decomposes readily, giving out heat when doing so.• Any solid substance with a flash point less than 120°C.• Any substance that is likely to spread fire by flowing from one part of a building to another.4. Places of special fire hazard are listed in the definitions in Appendix A.5. Maximum part of travel distance within the room/area. Travel distance outside the room/area should comply with the limits for the purpose group of the building or part.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 15B1Access control measures2.8 Measures to restrict access to the building (or parts of it) should not adversely affect fire safety provisions. It may be reasonable to close some escape routes outside normal business hours, but measures should remain to safely evacuate people left inside the building (see paragraph 5.6).Number of occupants and exits2.9 The building design should be based on the number of occupants. If the number is not known, use the appropriate floor space factors (Appendix D).Table 2.2 gives the minimum number of escape routes and exits from a room or storey for different numbers of occupants. This number is likely to be increased by the need to observe travel distances and other practical considerations.The width of escape routes and exits is given in paragraph 2.18.Table 2.2 Minimum number of escape routes and exits from a room, tier or storeyMaximum number of peopleMinimum number of escape routes/exits6016002More than 6003Alternative escape routes2.10 Alternative escape routes should satisfy one of the following criteria.a. They are in directions 45 degrees or more apart (Diagram 2.2).b. They are in directions less than 45 degrees apart, but separated from each other by fire resisting construction.See para 2.10Alternative escape routes are available from C because angle ACBis 45 degrees or more and therefore distance CA or CB (whichever is the less) should be no more than the maximum travel distance given for alternative escape routes.Alternative escape routes are not available from D because angleADB is less than 45 degrees (therefore see Diagram 2.1).There is also no alternative escape route from E.> 45°ABEDCSee para 2.10< 45°Diagram 2.2 Alternative escape routesInner rooms2.11 An inner room is at risk if a fire starts in the access room (Diagram 2.3). Such an arrangement should only be accepted if all of the following conditions are satisfied.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION16 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1a. The occupant number of the inner room does not exceed:i. 30 people for ‘residential (institutional)’ buildings (purpose group 2(a))ii. 60 people for other purpose groups.b. The inner room is not a bedroom.c. The inner room is entered directly from the access room (but not via a corridor).d. The escape route from the inner room does not pass through more than one access room.e. The travel distance from any point in the inner room to the exits from the access room does not exceed the distances in Table 2.1.f. The access room meets both of the following conditions.i. It is not a place of special fire hazard.ii. It is in the control of the same occupier.g. One of the following arrangements is made.i. The enclosures (walls or partitions) of the inner room stop a minimum of 500mm below the ceiling.ii. The door or walls of the inner room contain a vision panel (minimum 0.1m2), so people can see if a fire starts in the access room.iii. The access room is fitted with an automatic fire detection and alarm system to warn occupants of the inner room if a fire starts in the access room.See para 2.11Inner roomRoom withalternativeexitsAccess roomExitExitExitSee para 2.11Arrangement AArrangement BNOTES:Arrangement A Needs no special provision.Arrangement B Should observe the inner room provisions in paragraph 2.11.Diagram 2.3 Inner room and access roomPlanning of exits in a central core2.12 Where a central core has more than one exit, storey exits should be remote from one another and no two exits should be approached from the same lift hall, common lobby or undivided corridor (Diagram 2.4).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 17B1Open spatial planning2.13 Escape routes should not be within 4.5m of openings between floors, such as for an escalator, unless either of the following applies.a. The direction of travel is away from the opening.b. An alternative escape route does not pass within 4.5m of the open connection (Diagram 2.5).See para 2.12NOTE: The doors at both ends of the area marked ‘S’ should be self-closing fire doorsets unless the area is sub-divided such that any fire in that area will not be able to prejudice both sections of corridor at the same time. If that area is a lift lobby, doors should be provided as shown in Figure 9 in BS 9999. Lift Services, toilets, etc. Self-closing E 20 Sa fire doorsets Possible alternative position for fire doorset Corridor off which accommodation opens Protected stairway Accommodation (e.g. office space – indicative layout shown)LSFdFdaCPSALSFdaCPSFdFdFdFdFdFdLLLFdaCPSSee para 2.12AAAAAAAADiagram 2.4 Exits in a central coreSee para 2.13ExitExitFrom A and B at least one direction of travel is away from the opening. From C, where the initial direction of travel is towards the opening, one of the escape routes is not less than 4.5m from the opening.ABCOpening4.5mSee para 2.13Escape routeArea within 4.5m of the openingDiagram 2.5 Open connectionsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION18 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Access to storey exits2.14 Where a storey has more than one escape stair, it should be planned so that it is not necessary to pass through one stair to reach another. However, it would be acceptable to pass through one stair’s protected lobby to reach another stair.Separation of circulation routes from protected stairways2.15 Where they serve protected stairways that are part of primary circulation routes, self-closing fire doors should be fitted with an automatic release mechanism, to avoid them being rendered ineffective by misuse. Otherwise, the stair (and any associated exit passageway) should not form part of the primary circulation route between different parts of the building at the same level.Storeys divided into different uses2.16 If a storey contains areas for consuming food and/or drink, and where that is not the main use of the building, then both of the following apply.a. A minimum of two escape routes should be provided from each area, except from inner rooms that meet the conditions in paragraph 2.11.b. Those escape routes should lead directly to a storey exit without entering a kitchen or similar area of high fire hazard.Storeys divided into different occupancies2.17 Where a storey is divided into areas of occupancy under separate ownership or tenancy, then both of the following apply.a. The means of escape from each occupancy should not pass through any other occupancy.b. If a common corridor or circulation space is on the escape route, one of the following should apply.i. It should be a protected corridor.ii. A suitable automatic fire detection and alarm system should be installed throughout the storey.Width of escape routes and exits2.18 The width of escape routes and exits should meet the provisions in Table 2.3, as well as the guidance in Approved Document M.2.19 If the maximum number of people likely to use the escape route and exit is not known, it should be calculated using the occupant number guidance in Appendix D.2.20 Guidance on the spacing of fixed seating for auditoria is given in Annex D of BS 9999.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 19B1Table 2.3 Widths of escape routes and exitsMaximum number of peopleMinimum width (mm)(1)(2)(3)60750(4)1108502201050More than 2205 per person(5)NOTES:1. See Appendix D for methods of measurement.2. Widths may need to be increased to meet guidance in Approved Document M.3. Widths less than 1050mm should not be interpolated.4. May be reduced to 530mm for gangways between fixed storage racking, other than in public areas of ‘shop and commercial’ (purpose group 4) buildings.5. 5mm/person does not apply to an opening serving fewer than 220 people.Calculating exit capacity2.21 Where multiple storey exits are available, fire might prevent one from being used. Remaining exits need to be wide enough for all occupants, so when using Table 2.3, the largest exit should be discounted.Stairs should be at least as wide as any storey exit leading onto them. While some stairs are not subject to discounting (paragraphs 3.14 and 3.15), because the stairs will be available for other floors, the storey exits onto them are.2.22 To calculate how many people two or more available exits (after discounting) can accommodate, add together the maximum numbers of people that each exit width can accommodate. For example, three exits each 850mm wide accommodate 33110 = 330 people.2.23 If a ground floor storey exit and a stair share a final exit (via a ground floor lobby), then the final exit should be wide enough to evacuate people at a maximum flow rate equal to or greater than from the storey exit and stair combined (Diagram 2.6).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION20 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1See para 2.23Storey exit (N)DWDS Minimum 2m, where ‘N’ is greater than 60 people Number of people served by ground floor storey exit Width of final exit in metres Stair width in metresDNWSFinal exitSee para 2.23Ground floorlobbyEscape stairDiagram 2.6 Merging flows at final exitThis can be calculated using the following formula:W = ((N/2.5) + (60S))/80where:W is the width of final exit in metresN is the number of people served by ground floor storey exitS is the stair width in metres.If the number of people (N) entering the lobby from the ground storey is more than 60, then the distance from the foot of the stair or the storey exit to the final exit should be a minimum of 2m (see Diagram 2.6). If that minimum distance cannot be achieved, the width of the final exit (W) should be at least the width of the stair plus the width of the storey exit.Worked exampleA ground floor storey exit serving 250 people shares a common final exit with a 1.2m wide stair.Required final exit width = ((250/2.5) + (1.2360))/80 = 2.150mProtected corridors2.24 A corridor serving as part of the means of escape in any of the following circumstances should be a protected corridor.a. Every corridor that serves bedrooms.b. Every dead-end corridor (excluding recesses and extensions a maximum of 2m deep, as shown in Diagrams 2.7 and 2.8).c. Any corridor shared by two or more occupancies (paragraph 2.17).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 21B1See para 2.24Example 1Example 22m max.2m max.2m max.Corridor2m max.2m max.ProtectedstairwayProtectedstairwaySee para 2.24Diagram 2.7 Recesses off corridorsSee para 2.24Example 1Example 22m max.2m max.2m max.Corridor2m max.2m max.ProtectedstairwayProtectedstairwaySee para 2.24Diagram 2.8 Extension of corridor beyond a protected stairwayONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION22 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Enclosure of corridors that are not protected corridors2.25 If a corridor is used for a means of escape but is not a protected corridor, even though the enclosing partitions may have no fire resistance, both of the following should be met to inhibit the spread of smoke.a. Partitions should continue to the soffit of the structural floor above, or to a suspended ceiling.b. Openings into rooms from the corridor should be fitted with doors, which do not need to be fire doorsets.Open planning will not inhibit the spread of smoke, but occupants can become aware of a fire quickly.Division of corridors2.26 A corridor providing access to alternative escape routes should be divided by fire doorsets fitted with a self-closing device (and associated screens) where both of the following apply.a. It is more than 12m long.b. It connects two or more storey exits.The fire doorsets (including any screens) should be approximately mid-way between the two storey exits. They should safeguard the route from smoke, while considering the layout of the corridor and any adjacent fire risks.2.27 For buildings other than dwellings (purpose groups 2 to 7): if a cavity exists above the enclosures to a corridor as described above (because the enclosures are not carried to full storey height or the underside of the roof covering at the top storey), the potential for smoke to bypass the enclosure should be restricted by one of the following methods.a. Method 1 – Fitting cavity barriers on the line of the enclosure(s) to and across the corridor (Diagram 2.9).b. Method 2 – Dividing the storey using fire resisting construction that passes through the line of the division of the corridor (Diagram 2.9). Any cavity above this division should be fitted with cavity barriers on the line of division of the storey and the corridor.c. Method 3 – Enclosing the cavity on the lower side by a fire resisting ceiling that extends throughout the building, compartment or separated part.Any door that could provide a path for smoke to bypass the division should be fitted with a self-closing device (but need not necessarily be fire resisting).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 23B1See para 2.27NOTES:For all methods, where the corridor is a protected escape route, cavity barriers may also be required inany floor cavity beneath the corridor enclosure(see paragraph 9.5).The sub-division should be carried to full storeyheight and includes sub-division of thecorridor. A cavity barrier may be used in anyceiling cavity over the sub-division.FdFdMethod 1Section AAABBFdCorridorMethod 2Section BFdCorridorCavity barrierson line of corridorenclosure to anycavity aboveFire resistingsub-division.Any cavity above to havecavity barriersFloor cavityFloor cavityFire resistingsub-divisionCavity aboveceilingCavity aboveceilingFdFdFdFdFdFdCavity barrierFire resistingconstructionCavity barrierto ceilingcavityFire resistingconstructionCavity barrierto ceilingcavity abovefire resistingsub-divisionFire doorsetFdDiagram 2.9 Division of corridorsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION24 Approved Document B Volume 2, 2019 edition Building Regulations 2010B12.28 Where dead ends of corridors exceeding 4.5m long provide access to a point from which alternative escape routes are available, they should be separated by self-closing fire doorsets (together with any associated screens) from any part of the corridor that either:a. Provides two directions of escape (Diagram 2.10a)b. Continues past one storey exit to another (Diagram 2.10b).Alternatively, the stairs and corridors may be protected by a pressurisation system complying with BS EN 12101-6.See para 2.28FdFdFdFdFdFdFdFdFdFdFdFdFdFdFdFd‘T’ junction withmain corridorContinuationpast stairwaya.b. FdSelf-closing fire doorsetsProtected corridorDiagram 2.10 Dead-end corridors exceeding 4.5m longCavity barriers2.29 Additional measures to safeguard means of escape from smoke are given in Section 10.External escape routes2.30 Where an external escape route is beside an external wall of the building, the external wall should be of fire resisting construction in both of the following zones.a. Within 1800mm of the escape route.b. Up to 1100mm above the surface of the escape route. This does not apply to external escape stairs (see paragraph 3.32).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 25B1Escape over flat roofs2.31 Where a storey or part of a building has multiple escape routes available, one may be over a flat roof if it does not serve a ‘residential (institutional)’ (purpose group 2(a)) building, or part of a building intended for use by members of the public.2.32 Where an escape route over a flat roof is provided, the roof should comply with all of the following.a. It should be part of the same building from which escape is being made.b. The route across the roof should lead to a storey exit or external escape route.c. The part of the roof forming the escape route and its supporting structure, together with any opening within 3m of the escape route, should be fire resisting (minimum REI 30).d. The route should be clearly defined and guarded by walls and/or protective barriers to protect from falling.Residential care homesGeneral provisions2.33 The choice of fire safety strategy depends on the way a building is designed, furnished, staffed and managed, and on the level of dependency of the residents.2.34 In care homes for the elderly, some or all residents are likely to need help to evacuate. Buildings should generally be designed for progressive horizontal evacuation (PHE) in accordance with paragraphs 2.35 to 2.46.For other care home types, the most appropriate of either a PHE or simultaneous evacuation strategy should be identified. The approach adopted in the design of a building must be recorded and communicated to the building management team, who can adopt procedures compatible with the building design.Planning for progressive horizontal evacuation2.35 The guidance below on PHE is for care homes where the provisions of the Firecode documents do not apply (see paragraph 0.10).PHE requires areas used for the care of residents to be divided into protected areas by compartment walls and compartment floors. Protected areas provide a place of relative safety, from which further evacuation can be made if necessary.2.36 Each storey used for the care of residents should be divided by compartment walls into at least three protected areas. All floors should be compartment floors.2.37 Every protected area should have a minimum of two exits to adjoining protected areas. Maximum travel distances within a protected area should be both of the following.a. To the exit to the adjoining protected area: as shown in Table 2.1.b. From any point to a storey exit or a final exit: 64m.2.38 A fire in one protected area should not prevent occupants of other areas from reaching a final exit (Diagram 2.11). Escape routes should not pass through ancillary accommodation listed in paragraph 2.44.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION26 Approved Document B Volume 2, 2019 edition Building Regulations 2010B12.39 The number of residents’ beds in protected areas should be based on an assessment of both of the following.a. The number of staff likely to be available.b. The level of assistance that residents may require. The maximum number of residents’ beds in one protected area should not exceed 10, but may need to be lower depending on the assessment.2.40 A protected area used for horizontal evacuation from an adjoining protected area should have a floor area able to accommodate its own occupants plus those from the largest adjoining protected area.See para 2.38ExitExitEscape route to adjacentcompartment, storey exit or final exitCompartment wallNOTE: Bedrooms and all ancillary accommodation should be enclosedin fire resisting construction.Fire doorset in compartment wallDiagram 2.11 Progressive horizontal evacuation in care homesFire detection and alarm2.41 A fire detection and alarm system should be provided to L1 standard in accordance with BS 5839-1.Bedrooms2.42 Each bedroom in a care home should be enclosed in fire resisting construction (minimum REI 30) with fire resisting doors (minimum E 30). Every corridor serving bedrooms should be a protected corridor (see paragraph 2.24).2.43 Bedrooms should not contain more than one single or double bed.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 27B1Ancillary accommodation2.44 Ancillary accommodation such as all of the following should be enclosed by fire resisting construction (minimum REI 30).a. Chemical stores.b. Cleaners’ rooms.c. Clothes storage.d. Day rooms.e. Smoking rooms.f. Disposal rooms.g. Plant rooms.h. Linen stores.i. Kitchens.j. Laundry rooms.k. Staff changing and locker rooms.l. Store rooms.Door closing devices2.45 If doors fitted with a self-closing device could present an obstacle to residents, the following hardware in accordance with BS EN 1155 is appropriate.a. Bedrooms: free-swing door closers.b. Circulation spaces: hold-open devices.Sprinkler systems2.46 When a sprinkler system is provided in accordance with Appendix E, the following variations to the guidance given in paragraphs 2.35 to 2.45 are acceptable.a. Fire doorsets to bedrooms do not need to be fitted with self-closing devices.b. Protected areas may contain more than 10 beds.c. Bedrooms may contain more than one bed.If any of the variations are made, the management procedures should take account of the larger number of residents that may need assistance, and the need to manually close bedroom doors during sleeping hours.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB128 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 3: Design for vertical escapeIntroduction3.1 The limits on horizontal travel escape distances mean most people should be able to independently reach a protected escape route or final exit. The following guidance also includes measures for people who are unable to use stairs without help.In larger buildings, some escape stairs may need to serve as firefighting stairs, and Section 17 will also apply.Number of escape stairsMixed use buildings3.2 If a building contains storeys, or parts of storeys, in different purpose groups, it is necessary to consider providing either of the following.a. Separate escape routes from the areas of different use.b. Other effective means to protect common escape routes.Single escape stairs3.3 A single escape stair may serve a building (or part of a building) in the following situations.a. When independent escape routes from areas in different purpose groups are not necessary (see paragraph 3.2).b. From a basement that is allowed to have a single escape route in accordance with paragraph 2.6b and Table 2.1.c. In small premises, provided it meets the conditions in paragraph 4.2.d. From a building that meets both of the following conditions.i. It has no storey with a floor level more than 11m above ground level.ii. It is allowed to have only a single escape route in every storey in accordance with paragraph 2.6b and Table 2.1.e. An office building with a maximum of five storeys above the ground storey where both of the following apply.i. The travel distance from every point in each storey does not exceed the distances given in Table 2.1 for escape in one direction only.ii. Every storey with a floor level more than 11m above ground level has an alternative means of escape.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 29B1f. A factory comprising no more than either of the following.i. For low risk buildings, two storeys above the ground storey.ii. For normal risk buildings, one storey above the ground storey, provided the travel distance from every point on each storey does not exceed the distances given in Table 2.1 for escape in one direction only.g. Process plant buildings with a maximum of 10 people.Provision of refuges3.4 Refuges form part of the management plan and offer relatively safe areas for people to wait for a short period only. Refuges should meet the following conditions.a. Refuges should be provided on every storey (except ones consisting only of plant rooms) of each protected stairway providing an exit from that storey.b. Refuges do not need to be located within the stair enclosure, but should enable direct access to the stair.c. The number of refuge spaces does not need to equal the number of wheelchair users who may be in the building. A single refuge may be occupied by more than one person during the evacuation procedure.3.5 The following are both examples of satisfactory refuges.a. An enclosure such as a compartment (Diagram 3.1), protected lobby, protected corridor or protected stairway (Diagram 3.2).b. An area in the open air, such as a flat roof, balcony, podium or similar place, that meets both of the following.i. It is protected (or remote) from any fire risk.ii. It has its own means of escape.3.6 Refuges should be a minimum of 900mm  1400mm in size and accessible by someone in a wheelchair. Where sited in a protected stairway, protected lobby or protected corridor, they should not reduce the width of the escape route or obstruct the flow of people escaping.3.7 Refuges should be provided with an emergency voice communication (EVC) system complying with BS 5839-9. It should consist of Type B outstations communicating with a master station in the building control room (if one exists) or next to the fire detection and alarm panel. In some buildings, wireless technology may be more appropriate.3.8 Refuges and evacuation lifts should be clearly identified. In protected lobbies and protected stairways there should be a blue mandatory sign worded ‘Refuge – keep clear’ in addition to fire safety signs.3.9 Paragraph 5.32 gives guidance on using lifts, including evacuation lifts, during a fire.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION30 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1See para 3.5NOTE: People occupying Compartment A would not reach an available refuge until they had entered Compartment B. Two fire doorsets in the partition are necessary in case access to one of the doorsets is blocked by fire.FdFdSee para 3.5Compartment ACompartment BEscape route to adjacent compartment, storey exit or final exitCompartment wallRefuge in accordance with paragraphs 3.6 to 3.8Alternative escape route blocked by fireFire doorsetFdDiagram 3.1 Refuge formed by compartmentationSee para 3.5Provision where access to the refuge is counter to the access flow within the stairway.See para 3.5Wheelchair spaceOccupied by escape flowDiagram 3.2 Refuge formed in a protected stairwayWidth of escape stairs3.10 The width of escape stairs should meet all of the following conditions.a. It should be at least as wide as any exits giving access to the stairs.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 31B1b. It should be no less than the minimum widths given in Table 3.1.c. It should not reduce at any point on the way to a final exit.d. It should not exceed 1400mm in stairs taller than 30m, unless a central handrail is provided. When a central handrail is provided, the stair width on each side of it should be considered separately when assessing stair capacity.3.11 Approved Document K requires stairs more than 2000mm wide in public buildings to have a central handrail.3.12 If an exit route from a stair is also the escape route from the ground storey and/or basement storey, the width of the exit route may need to be increased (see paragraph 2.23).Table 3.1 Minimum widths of escape stairsSituation of stairMaximum number of people served(1)Minimum stair width (mm)1a. In a ‘residential (institutional)’ building (unless the stair will only be used by staff)1501000(2)1b. In an ‘assembly and recreation’ building and serving an area used for assembly purposes (unless the area is less than 100m²)22011001c. In any other building and serving an area with an occupancy of more than 50Over 220See note 32. Any stair not described above50800(4)NOTES:1. Assessed as likely to use the stair in a fire emergency.2. Section 6 of BS 9999 recommends that firefighting stairs should be at least 1100mm wide.3. See Table 3.2 for the size of stairs for simultaneous evacuation, and Table 3.3 for phased evacuation.4. To comply with the guidance in Approved Document M on minimum widths for areas accessible to disabled people, this may need to be increased to 1000mm.Calculation of minimum stair width3.13 The width depends on the number of stairs provided and the escape strategy (simultaneous or phased evacuation). If the maximum number of people needing to use escape stairs is unknown, calculate it using the floor space factors in Appendix D.Discounting of stairs3.14 Regardless of escape strategy, where two or more stairs are provided, it should be assumed that one might not be available during a fire. Each stair should be discounted in turn to ensure the capacity of the remaining stairs is adequate. This applies to buildings with or without a sprinkler system.3.15 Paragraph 3.14 does not apply if either of the following applies.a. Escape stairs are protected by a smoke control system designed in accordance with BS EN 12101-6.b. Escape stairs are approached on each storey (except the top storey) through a protected lobby.Despite these exceptions, at least one storey exit still needs to be discounted (paragraph 2.21). ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION32 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Paragraph 3.34 identifies cases where stairs need lobby protection.Simultaneous evacuation3.16 The width of escape stairs should take account of the number of people using them while evacuating all storeys at the same time. The following stairs should be designed to allow simultaneous evacuation.a. All stairs serving basements.b. All stairs serving buildings with open spatial planning.c. All stairs serving ‘residential (other)’ (purpose group 2(b)) or ‘assembly and recreation’ (purpose group 5) buildings.Annexes B and C of BS 9999 include designs based on simultaneous evacuation.3.17 The capacity of stairs of widths from 1000mm to 1800mm is given in Table 3.2.Table 3.2 Capacity of stairs for basements and for simultaneous evacuation of the buildingNo. of floors servedMaximum number of people served by a stair of width:1000mm1100mm1200mm1300mm1400mm1500mm1600mm1700mm1800mm115022024026028030032034036021902602853103353603854104353230300330360390420450480510427034037541044548051555058553103804204605005405806206606350420465510555600645690735739046051056061066071076081084305005556106657207758308859470540600660720780840900960105105806457107758409059701035NOTES:1. The capacity of stairs that serve more than 10 storeys may be obtained by using linear extrapolation.2. The capacity of stairs not less than 1100mm wide may also be obtained by using the formulas in paragraph 3.18.3. Unless a central handrail is provided, stairs with a rise of more than 30m should be a maximum width of 1400mm (see paragraph 3.10).4. Stairs wider than 2000mm should have a central handrail (see paragraph 3.11).3.18 As an alternative to Table 3.2, the capacity of stairs 1100mm wide or wider can be found using either of the following formulas:a. P = 200W + 50 (W – 0.3)(N – 1)b. W = P + 15N – 15 / 150 + 50Nwhere:ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 33B1P is the number of people that can be servedW is the width of the stair, in metresN is the number of storeys served.Separate calculations should be made for stairs serving basement storeys and stairs serving upper storeys.The population, P, should be divided by the number of available stairs.The formula is useful to determine the width of stairs where people are not distributed evenly – either within a storey or between storeys.In the formula, 200W represents the number of people estimated to have left the stair after 2.5 minutes of evacuation, and 50 (W – 0.3)(N – 1) represents the number of people estimated to be on the stair after 2.5 minutes of evacuation.Worked examplesA 14 storey building contains 12 storeys of offices (ground + 11). The top two storeys contain flats that are served by separate stairs. What is the minimum width needed for the stairs that serve the office floors, for simultaneous evacuation? In the 11 above-ground-floor offices, 1200 people use the stairs. (People in the ground floor offices do not use the stairs.) In this example, two stairs are shown to satisfy the travel distance limitations.a. The population is distributed evenlyThe top office storey is at a height greater than 18m, therefore both stairs need lobby protection (see paragraph 3.34). Because both stairs are entered at each level via a protected lobby, both stairs can be assumed to be available (see paragraph 3.15).P = 1200/2 = 600, N = 11From the formula:600 = 200W + 50 (W – 0.3)(11 – 1)600 = 200W + (50W – 15)(10)600 = 200W + 500W – 150750 = 700WW = 1070mmTherefore both stairs should be at least 1070mm wide. But this needs to be increased to 1100mm, because the formula applies to stairs 1100mm wide or wider (see paragraph 3.18).This width will also be adequate when one storey exit is discounted as described in paragraph 2.21. It also complies with paragraph 3.10a (i.e. the stair widths are not less than the minimum widths needed for 110 people in Table 2.3).b. The population is not distributed evenly(e.g. 1000 people occupy floors 1 to 9, and 200 occupy floors 10 and 11).The top office storey is at a height greater than 18m, therefore both stairs need lobby protection (see paragraph 3.34). Because both stairs are entered at each level via a protected lobby, both stairs can be assumed to be available (see paragraph 3.15).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION34 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1To find the width of:• the stairs serving floors 10 and 11:P = 200/2 = 100, N = 2From the formula:100 = 200W + 50 (W – 0.3)(2 – 1)100 = 200W + (50W – 15)(1)100 = 200W + 50W – 15115 = 250WW = 460mmTherefore both stairs between the 9th floor landing and the top floor should be at least 460mm wide. But this needs to be increased to 1100mm, because the formula applies to stairs 1100mm wide or wider (see paragraph 3.18).This width will also be adequate when one storey exit is discounted as described in paragraph 2.21. It also complies with paragraph 3.10a (i.e. the stair widths are not less than the minimum widths needed for 100 people in Table 2.3).• the stairs serving floors 1 to 9:P = 1200/2 = 600, N = 9From the formula:600 = 200W + 50 (W – 0.3)(9 – 1)600 = 200W + (50W – 15)(8)600 = 200W + 400W – 120720 = 600WW = 1200mmTherefore both stairs between the ninth floor landing and the ground floor should be at least 1200mm wide.This width will also be adequate when one storey exit is discounted as described in paragraph 2.21. It also complies with paragraph 3.10a (i.e. the stair widths are not less than the minimum widths needed for 134 people in Table 2.3).Phased evacuation3.19 Phased evacuation cannot be used in every type of building, but can be advantageous for escape stairs in high buildings. It requires supporting facilities, such as fire detection and alarm systems, to be provided and maintained.In a phased evacuation, the first people to be evacuated are those with reduced mobility and those on the storey most immediately affected by the fire. If needed, subsequent evacuation is done two floors at a time, reducing disruption in large buildings. Phased evacuation enables stairs to be narrower than with simultaneous evacuation, and may be used for any building provided it is not identified in paragraph 3.16.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 35B13.20 Phased evacuation in buildings with a storey over 30m in height introduces the potential for escaping people to impede firefighters entering and operating within the building. This can be addressed by consulting with the fire and rescue service about special management procedures.In very tall buildings, typically with a storey over 45m in height, physical measures may need to be incorporated, such as by discounting a stair.3.21 A building (or part of a building) designed for phased evacuation should satisfy all of the following criteria.a. At each storey except a top storey, stairs should be approached through a protected lobby or protected corridor.b. At each storey, the lifts should be approached through a protected lobby (see paragraph 5.37).c. Every floor should be a compartment floor (REI depending on height and use of the building).d. If there is a storey over 30m above ground level, the building should be protected throughout by an automatic sprinkler system in accordance with Appendix E.e. The building should be fitted with an appropriate fire warning system conforming to at least the L3 standard given in BS 5839-1.f. An internal speech communication system should provide communication between a control point at fire and rescue service access level and a fire warden on every storey. The recommendations for phased evacuation provided in BS 5839-1 should be followed. Where it is deemed appropriate to install a voice alarm, this should be in accordance with BS 5839-8.3.22 The minimum width of stairs needed for phased evacuation is given in Table 3.3.Table 3.3 Minimum width of stairs designed for phased evacuationMaximum number of people in any storeyStair width (mm)100100012011001301200140130015014001601500170160018017001901800NOTES:1. This table assumes a phased evacuation of the fire floor first followed by evacuation of not more than two floors at a time.2. Unless a central handrail is provided, stairs with a rise of more than 30m should be a maximum width of 1400mm (see paragraph 3.10).3. As an alternative to using this table, the minimum width (in mm) may be calculated from: (P10) – 100 where P = the number of people on the most heavily occupied storey. However, the minimum width of a stair should be 1000mm.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION36 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Worked example using Table 3.3What is the minimum width needed for the stairs serving a 15 storey office building (ground + 14 office floors), assuming a total population of 2500 people (excluding the ground floor population, which does not use the stairs)? To satisfy the travel distance limitations, three stairs are required.The building is over 45m in height and designed for phased evacuation. It has been decided to discount one stair to take account of fire and rescue service operations as described in paragraph 3.20. Therefore:• Number of people per storey = 2500/14 = 179.Each remaining stair must be able to accommodate half the population of one storey (i.e. 90 people).Thus each stair should be 1000mm wide (maximum capacity 100 people).This width will also be adequate when one storey exit is discounted as described in paragraph 2.21. It also complies with paragraph 3.10a (i.e. the stair widths are not less than the minimum width needed for 90 people in Table 2.3).• At least one of those stairs needs to be a firefighting stair, therefore a minimum width of 1100mm is needed (see note 2 to Table 3.1).Additional worked example using Table 3.3What is the minimum width needed for the stairs serving a 9 storey office building (ground + 8 office floors), assuming a total population of 1920 people (excluding the ground floor population, which does not use the stairs)? To satisfy the travel distance limitations, two stairs are required.As both stairs need to be entered at each level through a protected lobby (see paragraph 3.21), both stairs can be assumed to be available (see paragraph 3.15). Therefore:• Number of people per storey = 1920/8 = 240.• Each stair must be able to accommodate half the population of one storey (i.e. 240/2 = 120 people).• Thus both stairs would require a width of 1100mm (maximum capacity 120 people) according to Table 3.3, but:• Each storey exit needs to be able to serve 240 people, because of discounting as described in paragraph 2.21. The minimum exit width needed for 240 people in Table 2.3 is 1200mm. As described in paragraph 3.10a, the stair should be at least as wide as the storey exit serving it.• The required stair width is therefore 1200mm.Design and protection of escape stairsEnclosure of escape stairs3.23 Every internal escape stair should be a protected stairway (within a fire resisting enclosure). If it is also a protected shaft (i.e. it passes from one compartment to another) or firefighting shaft, additional guidance in Sections 8 and 17 applies.There is one exception: an unprotected stair (e.g. an accommodation stair) may form part of an internal route to a storey exit or final exit, provided that the distance of travel and the number of people involved are very limited. For example, small premises (Section 4) and raised storage areas (see paragraphs 7.6 and 7.7).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 37B1Construction of escape stairs3.24 The flights and landings of escape stairs should be constructed of materials achieving class A2-s3, d2 or better in all of the following situations.a. If the escape stair is the only stair serving the building or part of the building, unless the building has two or three storeys and is an office building. b. If the escape stair is within a basement storey.c. If the escape stair serves any storey that has a floor level more than 18m above ground or access level.d. If the escape stair is external, except where the stair connects the ground floor or ground level with a floor or flat roof a maximum of 6m above or below ground level.e. If the escape stair is a firefighting stair.Materials achieving class B-s3, d2 or worse may be added to the top horizontal surface, except on firefighting stairs.3.25 Further guidance on firefighting stairs is given in Section 17. Dimensional constraints on the design of stairs are given in Approved Document K.Single steps3.26 Single steps on escape routes should be prominently marked. A single step on the line of a doorway is acceptable, subject to paragraph 5.22.Helical stairs and spiral stairs 3.27 Helical stairs and spiral stairs may form part of an escape route provided they are designed in accordance with BS 5395-2. If they are intended to serve members of the public, stairs should be type E (public) stairs.Fixed ladders 3.28 Fixed ladders should not be provided as a means of escape for members of the public. They should only be provided where a conventional stair is impractical, such as for access to plant rooms which are not normally occupied.External walls adjacent to protected stairways3.29 With some configurations of external wall, a fire in one part of a building could subject the external wall of a protected stairway to heat (for example, where the two are adjacent at an internal angle in the façade, as shown in Diagram 3.3).3.30 If a protected stairway projects beyond, is recessed from or is in an internal angle of the adjoining external wall of the building, then the minimum distance between an unprotected area of the building enclosure and an unprotected area of the stair enclosure should be 1800mm.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION38 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1See para 3.29Configuration AConfiguration BAccommodationAccommodationStairAccommodationStairAccommodationConfigurations of stairs and external wall1800mmmin.1800mmmin.1800mm min.See para 3.29Fire resisting constructionof adjacent building enclosureFire resisting constructionof protected stairwayNon-fire resisting constructionDiagram 3.3 External protection to protected stairwaysExternal escape stairs3.31 Where a storey or part of the building has more than one escape route available, some of the escape routes may be via an external escape stair, provided the following conditions are met.a. There is at least one internal escape stair from every part of each storey (excluding plant areas).b. In the case of an ‘assembly and recreation’ (purpose group 5) building, the route is not intended for use by the public.c. In the case of a ‘residential (institutional)’ (purpose group 2(a)) building, the route serves only office or residential staff accommodation.3.32 Any external escape stair should meet all of the following conditions (Diagram 3.4).a. Doors to the stair should be fire resisting (minimum E 30) and be fitted with a self-closing device, except for a single exit door from the building to the top landing of a downward-leading external stair, provided it is the only door onto the landing.b. Fire resisting construction (minimum RE 30) is required for the building envelope within the following zones, measured from the flights and landings of the external stair.i. 1800mm above and horizontally.ii. 9m vertically below.iii. 1100mm above the top landing of the stair (except where the stair leads from basement to ground level).c. Fire resisting construction (minimum RE 30) should be provided for any part of the building (including doors) within 1800mm of the escape route from the foot of the stair to a place of safety. This does not apply if there are alternative escape routes from the foot of the external escape stair.d. Stairs more than 6m in height should be protected from adverse weather. Protection should prevent the build-up of snow or ice but does not require full enclosure. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 39B1e. Glazing in areas of fire resisting construction should be fixed shut and fire resisting, in terms of integrity but not insulation (minimum E 30). 3.33 Access to an external escape stair may be via a flat roof, provided the flat roof meets the requirements of paragraphs 2.31 and 2.32.See para 3.32Ground level or a roofor podium served by anindependent stairwayGround level or a roofor podium served by anindependent stairwayExample a.Example b.Section A–ASection B–BPlan1100mmabove toplanding1100mmabovetop landingNo fire resistancerequired for doorFire resisting window(minimum RE 30)AABB1800mm1800mm1800mm1800mmNOTE:See para 3.31 on the provisionof external stairs.See para 3.32d for weatherprotection provisions.1800mm1800mm1800mmFdFdFd9mbelow stairflights andlandings9mbelow stairflights andlandingsFire resisting construction(minimum RE 30)Fire doorset (minimum E 30)FdDiagram 3.4 Fire resistance of areas near to external stairsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION40 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Access lobbies and corridors3.34 In the following situations, protected lobbies or protected corridors should be provided at all storeys above ground, except the top storey.a. If the stair is the only one serving a building or part of a building that has more than one storey above or below the ground storey.b. If the stair serves any storey at a height of 18m or more above ground level.c. If the building is designed for phased evacuation.d. If the stair is a firefighting stair.e. If the option in paragraph 3.15b has been used so as not to discount one stair when calculating stair widths.As an alternative to (a) to (c), a smoke control system as described in paragraph 3.15a may be used.3.35 A protected lobby should be provided between an escape stair and a place of special fire hazard to protect from the ingress of smoke. The lobby should have a minimum 0.4m2 of permanent ventilation, or be protected by a mechanical smoke control system.Exits from protected stairways3.36 Every protected stairway should lead to a final exit, either directly or via an exit passageway. Any protected exit corridor or stair should have the same standard of fire resistance and lobby protection as the stair it serves. The exit from a protected stairway should comply with paragraphs 5.20 to 5.24.Separation of adjoining protected stairways3.37 The construction separating two adjacent protected stairways (or exit passageways) leading to different final exits should be imperforate.Use of space within protected stairways3.38 A protected stairway may only include any of the following.a. Sanitary accommodation or washrooms, as long as the accommodation is not used as a cloakroom. A gas water heater or sanitary towel incinerator may be installed in the accommodation, but no other gas appliance.b. If the protected stairway is not a firefighting stair: a lift well.c. If the protected stairway is not the only stair serving the building or part of the building: a reception desk or enquiry office area at ground or access level. The reception or enquiry office area should have a maximum area of 10m2.d. If the protected stairway is not the only stair serving the building or part of the building: cupboards enclosed with fire resisting construction.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 41B1Gas service and installation pipes in protected stairways3.39 Gas service and installation pipes and meters should not be within a protected stairway, unless installed in accordance with the Pipelines Safety Regulations 1996 and the Gas Safety (Installation and Use) Regulations 1998.Basement stairs3.40 An escape stair forming part of the only escape route from an upper storey should not continue down to serve a basement storey. The basement storey should be served by a separate escape stair.3.41 Where multiple escape stairs serve the upper storeys, only one needs to end at ground level. Other stairs may connect with the basement storeys if there is a protected lobby or a protected corridor between the stairs and accommodation at each basement level.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB142 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 4: Small premises4.1 A ‘small premises’ is generally limited both in its size and in its number of occupants. When undivided, all of its parts are likely to be clearly visible to occupants. Occupants of small premises will be able to reach an exit quickly in an emergency and therefore a reduction in the number of exits and stairs is acceptable. This guidance is not applicable to small premises where highly flammable materials are sold, stored or used.4.2 Small premises should meet all of the following general conditions.a. i. It should be single occupancy.ii. It should not comprise more than a basement storey, ground storey and first storey.iii. No storey should have a floor area more than 280m2.b. Any kitchen or other open cooking arrangements should be at the extremity of any dead end remote from the exits.c. For a bar or restaurant, the seating or standing accommodation (Table D1) should be planned for a maximum of 30 people per storey. The seating or standing accommodation for the ground storey may be planned for 100 people if it has a final exit independent of the stair.4.3 The following paragraphs only apply in place of those provisions elsewhere in this Approved Document which relate to the following.a. The number and position of exits and protected stairways.b. Measuring distances of travel.c. Open escape stairs.For provisions other than those listed above, the guidance elsewhere in this Approved Document should be followed.Construction4.4 Except in kitchens, ancillary offices and stores, floor areas should be undivided so exits are clearly visible from all parts.4.5 Store rooms should be enclosed with fire resisting construction (minimum REI 30).Travel distance and number of escape routes4.6 Escape routes should be sited so that the travel distance from any point of a storey to the nearest storey exit does not exceed the distance given in Table 4.1 (see Diagrams 4.1, 4.2 and 4.3). The siting of two or more exits or stairs should give effective alternative directions of travel from any point in a storey.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 43B1Table 4.1 Maximum travel distances in small premisesStoreyMaximum travel distance (m)Ground storey with a single exit27Basement or first storey with a single stair18Storey with more than one exit/stair45NOTES:If the internal layout of partitions, fittings, etc. is not known, direct distances, rather than travel distances, should be assessed. The direct distance should be assumed to be two-thirds of the travel distance.The travel distance in small premises with an open stair is measured as follows.a. In a basement: to the foot of the stair.b. On a first storey: to the head of the stair.See para 4.6NOTE: Maximum floor area in any one storey 280m2. Restricted accommodation if used as a restaurant or bar.Basement and/or first storeyGround storey27m max.18m max.18m max.See para 4.6ProtectedstairwayProtectedstairwayDiagram 4.1 Maximum travel distances in a small two or three storey premises with a single protected stairway to each storeyONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION44 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1See para 4.6Basement or first storeyGround storey3m max.18m max.27m max.18m max. Maximum floor area in any one storey 90m2. The premises may not be used as a resturant or bar. Only acceptable in two storey premises (first + ground storey or basement + ground storey). Travel distances are set out in Table 4.1.NOTES:1.2.3.4.See para 4.6Diagram 4.2 Maximum travel distances in a small three storey premises with a single open stairONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 45B1See para 4.6ProtectedstairwayProtectedstairwayProtectedstairwayProtectedstairway27m max.18m max.18m max.18m max.18m max.18m max.18m max.18m max.18m max.27m max.3m max.3m max.NOTES:1.2.3.4. Maximum floor area in any one storey 90m2. Enclosed stair at ground storey level may be from either the basement or the first storey. The premises may not be used as a resturant or bar. Travel distances are set out in Table 4.1.BasementBasementFirst storeyGround storeyGround storeyFirst storeyExample 1Example 2See para 4.6Diagram 4.3 Maximum travel distances in a small three storey premises with a single stair to each storeyONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION46 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Escape stairs in small premises4.7 A single escape stair may be used in small premises.4.8 An open stair may be used as a means of escape if all of the following apply.a. The stair connects a maximum of two storeys.b. The stair enters the ground storey a maximum of 3m from the final exit (see Diagrams 4.2 and 4.3).c. The premises is not a bar or restaurant.d. Either of the following applies.i. The storey is also served by a protected stairway.ii. The stair is a single stair and the floor area of any single storey is a maximum of 90m2.4.9 Where the premises contains three storeys and a single open stair serves a top or bottom storey, the stair serving the other storey should be enclosed with fire resisting construction at the ground storey level and discharge to a final exit independent of the ground storey (see Diagram 4.3).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB1Building Regulations 2010 Approved Document B Volume 2, 2019 edition 47Section 5: General provisionsIntroduction5.1 This section applies to all buildings and deals with the design, construction and protection of escape routes and service installations.Protection of escape routesFire resistance of enclosures5.2 Fire resistance test criteria are set out in Appendix B. Standards of performance are summarised in Tables B3 and B4. Apart from specific situations described in Sections 1 and 2, and requirements B3 and B5, a minimum performance of REI 30 is sufficient to protect means of escape. Fire resistance of doors5.3 Fire resistance test criteria are set out in Appendix C. Standards of performance are summarised in Table C1.Fire resistance of glazed elements5.4 If glazed elements in fire resisting enclosures and doors can only meet the required integrity performance, their use is limited. These limitations depend on whether the enclosure forms part of a protected shaft (see Section 8) and the provisions set out in Appendix B, Table B5. If both integrity and insulation performance can be met, there is no restriction in this document on the use or amount of glass.5.5 Glazed elements should also comply with the following, where necessary.a. If the enclosure forms part of a protected shaft: Section 8.b. Appendix B, Table B5.c. Guidance on the safety of glazing: Approved Document K.Doors on escape routes5.6 Doors should be readily openable to avoid undue delay to people escaping. Doors on escape routes (both within and from the building) should comply with paragraphs 5.7 to 5.15. Guidance on door closing and ‘hold open’ devices for fire doorsets is set out in Appendix C.Door fastenings5.7 In general, doors on escape routes (whether or not the doors are fire doorsets) should be either of the following.a. Not fitted with a lock, latch or bolt fastenings.b. Fitted only with simple fastenings that are all of the following.i. Easy to operate; it should be apparent how to undo the fastening.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION48 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1ii. Operable from the side approached by people escaping.iii. Operable without a key.iv. Operable without requiring people to manipulate more than one mechanism. Doors may be fitted with hardware to allow them to be locked when rooms are empty. In places such as hotel bedrooms, locks may be fitted that are key operated from the outside and manually opened from the inside.If a secure door is operated by code or combination keypad, swipe or proximity card, biometric data, etc., a security mechanism override should be possible from the side approached by people escaping.5.8 Electrically powered locks should return to the unlocked position in all of the following situations.a. If the fire detection and alarm system operates.b. If there is loss of power or system error.c. If the security mechanism override is activated.Security mechanism overrides for electrically powered locks should be a Type A call point as described in BS 7273-4. The call point should be positioned on the side approached by people escaping. If the door provides escape in either direction, a call point should be installed on both sides of the door.5.9 In places of assembly and shop and commercial buildings (purpose groups 4 and 5), doors on escape routes from rooms with more than 60 people should be either of the following.a. Not fitted with locks, latches or bolts.b. Fitted with panic fastenings in accordance with BS EN 1125.In non-residential buildings (purpose groups 3 to 7), some final exit doors feature security locks that are used only when the building is empty. Such locks may be appropriate, but management procedures must emphasise their safe use.5.10 Guidance on door closing and ‘hold open’ devices for fire doorsets is set out in Appendix C.Direction of opening5.11 The door of any doorway or exit should be hung to open in the direction of escape whenever reasonably practicable. It should always be hung to open in the direction of escape if either of the following conditions applies. a. More than 60 people might be expected to use it during a fire.b. There is a very high risk of fire with potential for rapid fire growth, such as with some industrial activities.Amount of opening and effect on associated escape routes5.12 All doors on escape routes should be hung to meet both of the following conditions.a. Open by a minimum of 90 degrees.b. Open with a swing that complies with both of the following.i. Is clear of any change of floor level, other than a threshold or single step on the line of the doorway.ii. Does not reduce the effective width of any escape route across a landing.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 49B15.13 Any door opening towards a corridor or a stair should be recessed to prevent its swing encroaching on the effective width.Vision panels in doors5.14 Doors should contain vision panels in both of the following situations.a. Where doors on escape routes divide corridors.b. Where doors are hung to swing both ways. Approved Document M contains guidance about vision panels in doors across accessible corridors and Approved Document K contains guidance about the safety of glazing.Revolving and automatic doors5.15 Where revolving doors, automatic doors and turnstiles are placed across escape routes they should comply with one of the following.a. They are automatic doors of the required width and comply with one of the following conditions.i. Their failsafe system provides outward opening from any open position.ii. They have a monitored failsafe system to open the doors if the mains electricity supply fails.iii. They failsafe to the open position if the power fails.b. Non-automatic swing doors of the required width are provided immediately adjacent to the revolving or automatic door or turnstile.General provisionsHeadroom in escape routes5.16 Escape routes should have a minimum clear headroom of 2m. The only projections allowed below this height are door frames.Flooring of escape routes5.17 Escape route floor finishes should minimise their slipperiness when wet. Finishes include the treads of steps and surfaces of ramps and landings.Ramps and sloping floors5.18 A ramp forming part of an escape route should meet the provisions in Approved Document M. Any sloping floor or tier should have a pitch of not more than 35 degrees to the horizontal.5.19 Guidance for where there is fixed seating is given in both of the following.a. Approved Documents K and M give guidance on the design of ramps and associated landings, and on aisles and gangways where there is fixed seating.b. Section 2 of this document refers to Annex D of BS 9999, which gives guidance on the design of means of escape in places with fixed seating.Final exits5.20 The width of a final exit should be at least the same as the minimum required width of the escape route it serves.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION50 Approved Document B Volume 2, 2019 edition Building Regulations 2010B15.21 People should be able to rapidly leave the area around the building. Direct access to a street, passageway, walkway or open space should be available. The route away from the building should comply with the following.a. Be well defined.b. If necessary, have suitable guarding.5.22 Final exits should not present a barrier for disabled people. Where the route to a final exit does not include stairs, a level threshold and, where necessary, a ramp should be provided.5.23 Final exit locations should be clearly visible and recognisable.5.24 Final exits should avoid outlets of basement smoke vents and openings to transformer chambers, refuse chambers, boiler rooms and similar risks.Table 5.1 Provisions for escape lighting Use of the building or part of the buildingAreas requiring escape lightingResidential All common escape routes(1), except in two storey blocks of flatsOffice, industrial, storage and other non-residentiala. Underground or windowless accommodationb. Stairs either:• in a central core • that serve storey(s) more than 18m above ground levelc. Internal corridors more than 30m longd. Open-plan areas of more than 60m2Shop and commercial, and car parksa. Underground or windowless accommodationb. Stairs either: • in a central core • that serve storey(s) more than 18m above ground levelc. Internal corridors more than 30m longd. Open-plan areas of more than 60m2e. All escape routes (other than the following exception) to which the public are admitted.(1) The exception is shops that meet all of the following:• have a maximum of three storeys • have no sales floor of more than 280m2• are not a restaurant or barAssembly and recreationa. All escape routes(1)b. Accommodation except for that which is open on one side to view sport or entertainment during normal daylight hours Any purpose groupa. All toilet accommodation with a minimum floor area of 8m2b. Electricity and generator roomsc. Switch room/battery room for emergency lighting systemd. Emergency control roomsNOTE:1. Including external escape routes.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 51B1Lighting of escape routes5.25 All escape routes should have adequate artificial lighting. If the mains electricity power supply fails, escape lighting should illuminate the routes listed in Table 5.1.5.26 Escape stair lighting should be on a separate circuit from the electricity supply to any other part of the escape route.5.27 Escape lighting should conform to BS 5266-1.Exit signs5.28 Every doorway or other exit providing access to a means of escape, other than exits in ordinary use (e.g. main entrances), should be distinctively and conspicuously marked by an exit sign in accordance with BS ISO 3864-1 and BS 5499-4.Advice on fire safety signs, including emergency escape signs, is given in the HSE publication Safety Signs and Signals: Guidance on Regulations.Some buildings may require additional signs to comply with other legislation.Protected power circuits5.29 To limit potential damage to cables in protected circuits, all of the following should apply.a. Cables should be sufficiently robust.b. Cable routes should be carefully selected and/or physically protected in areas where cables may be exposed to damage.c. Methods of cable support should be class A1 rated and offer at least the same integrity as the cable. They should maintain circuit integrity and hold cables in place when exposed to fire. 5.30 A protected circuit to operate equipment during a fire should achieve all of the following. a. Cables should achieve PH 30 classification when tested in accordance with BS EN 50200 (incorporating Annex E) or an equivalent standard.b. It should only pass through parts of the building in which the fire risk is negligible.c. It should be separate from any circuit provided for another purpose.5.31 Guidance on cables for large and complex buildings is given in BS 5839-1, BS 5266-1 and BS 8519.LiftsEvacuation lifts5.32 Generally, lifts should not be used when there is a fire in the building, unless their use forms part of a management plan for evacuating people and the following conditions are met.a. Lifts are appropriately sited and protected.b. Lifts contain safety features to ensure they remain usable during a fire.Guidance on the design and use of evacuation lifts is given in Annex G to BS 9999.5.33 Where a firefighting lift is provided, it can be used to evacuate disabled people. Management plans should describe how this would be managed, and what will happen when the fire and rescue service arrives.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION52 Approved Document B Volume 2, 2019 edition Building Regulations 2010B1Fire protection of lift installations5.34 Lift wells should comply with one of the following conditions.a. Be sited within the enclosures of a protected stairway.b. Be enclosed with fire resisting construction (minimum REI 30) when in a position that might prejudice the means of escape.5.35 A lift well connecting different compartments should form a protected shaft (see Section 8).5.36 Lifts that rise within a large volume such as a mall or atrium and do not have a conventional well, such as wall-climber or feature lifts, may be at risk if they run through a smoke reservoir. Care should be taken to maintain the integrity of the smoke reservoir and protect people in the lift.5.37 In buildings designed for phased evacuation or progressive horizontal evacuation, if the lift well is not within the enclosures of a protected stairway, its entrance should be separated at every storey by a protected lobby (minimum REI 30).5.38 In basements and enclosed car parks, the lift should be within the enclosure of a protected stairway. Otherwise, the lift should be approached only via a protected lobby or protected corridor (minimum REI 30).5.39 If a lift delivers into a protected corridor or protected lobby serving sleeping accommodation and also serves a storey containing a high fire risk (such as a kitchen, communal areas, stores, etc.) then the lift should be separated from the high fire risk area(s) by a protected lobby or protected corridor (minimum REI 30).5.40 A lift shaft serving storeys above ground level should not serve any basement if either of the following applies.a. There is only one escape stair serving storeys above ground level and smoke from a basement fire would adversely affect escape routes in the upper storeys.b. The lift shaft is within the enclosure to an escape stair that terminates at ground level.5.41 Lift machine rooms should be sited over the lift well where possible. Where buildings or part of a building with only one stairway make this arrangement impractical, the lift machine room should be sited outside the protected stairway.Refuse chutes and storage5.42 Refuse storage chambers, refuse chutes and refuse hoppers should be sited and constructed in accordance with BS 5906.5.43 Refuse chutes and rooms for storing refuse should meet both of the following conditions.a. Be separated from other parts of the building by fire resisting construction (minimum REI 30 in buildings with a top storey up to 5m above ground level; otherwise REI 60).b. Not be situated within a protected stairway or protected lobby.5.44 The approach to rooms containing refuse chutes or for storing refuse should comply with one of the following conditions. a. Be directly from the open air.b. Be through a protected lobby with a minimum 0.2m2 of permanent ventilation.5.45 Access openings to refuse storage chambers should not be sited next to escape routes or final exits.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 53B1Shop store rooms5.46 Fully enclosed walk-in store rooms should be separated from retail areas with fire resisting construction (minimum REI 30) if they negatively affect the means of escape. The fire resisting construction is not necessary if the walk-in store room complies with either of the following.a. Has an automatic fire detection and alarm system.b. Is fitted with sprinklers.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB254 Approved Document B Volume 2, 2019 edition Building Regulations 2010Requirement B2: Internal fire spread (linings)This section deals with the following requirement from Part B of Schedule 1 to the Building Regulations 2010.RequirementRequirementLimits on applicationInternal fire spread (linings)B2. (1) To inhibit the spread of fire within the building, the internal linings shall— (a) adequately resist the spread of flame over their surfaces; and (b) have, if ignited, either a rate of heat release or a rate of fire growth, which is reasonable in the circumstances. (2) In this paragraph “internal linings” means the materials or products used in lining any partition, wall, ceiling or other internal structure.IntentionIn the Secretary of State’s view, requirement B2 is met by achieving a restricted spread of flame over internal linings. The building fabric should make a limited contribution to fire growth, including a low rate of heat release.It is particularly important in circulation spaces, where linings may offer the main means by which fire spreads and where rapid spread is most likely to prevent occupants from escaping.Requirement B2 does not include guidance on the following.a. Generation of smoke and fumes.b. The upper surfaces of floors and stairs.c. Furniture and fittings. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB2Building Regulations 2010 Approved Document B Volume 2, 2019 edition 55Section 6: Wall and ceiling liningsClassification of linings6.1 The surface linings of walls and ceilings should meet the classifications in Table 6.1.Table 6.1 Classification of liningsLocationClassificationSmall rooms of maximum internal floor area: a. 4m2 in residential accommodationb. 30m2 in non-residential accommodationD-s3, d2Other rooms (including garages)C-s3, d2Other circulation spacesB-s3, d2(1)NOTE:1. Wallcoverings which conform to BS EN 15102, achieving at least class C-s3, d2 and bonded to a class A2-s3, d2 substrate, will also be acceptable.Walls6.2 For the purposes of this requirement, a wall includes both of the following.a. The internal surface of internal and external glazing (except glazing in doors).b. Any part of a ceiling which slopes at an angle greater than 70 degrees to the horizontal.6.3 For the purposes of this requirement, a wall does not include any of the following.a. Doors and door frames.b. Window frames and frames in which glazing is fitted.c. Architraves, cover moulds, picture rails, skirtings and similar narrow members.d. Fireplace surrounds, mantle shelves and fitted furniture.6.4 Parts of walls in rooms may be of lower performance than stated in Table 6.1, but no worse than class D-s3, d2. In any one room, the total area of lower performance wall lining should be less than an area equivalent to half of the room’s floor area, up to a maximum of:a. 20m2 in residential accommodation.b. 60m2 in non-residential accommodation.Ceilings6.5 For the purposes of this requirement, a ceiling includes all of the following.a. Glazed surfaces.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION56 Approved Document B Volume 2, 2019 edition Building Regulations 2010B2b. Any part of a wall at 70 degrees or less to the horizontal.c. The underside of a gallery.d. The underside of a roof exposed to the room below.6.6 For the purposes of this requirement, a ceiling does not include any of the following.a. Trap doors and their frames.b. The frames of windows or rooflights and frames in which glazing is fitted.c. Architraves, cover moulds, picture rails, exposed beams and similar narrow members.Fire resisting ceilings6.7 The need for cavity barriers in concealed floor or roof spaces can be reduced by installing a fire resisting ceiling (minimum EI 30) below the cavity, complying with Diagram 9.3.Rooflights6.8 Rooflights should meet the following classifications, according to material. No guidance for European fire test performance is currently available, because there is no generally accepted test and classification procedure.a. Non-plastic rooflights should meet the relevant classification in Table 6.1.b. Plastic rooflights, if the limitations in Table 6.2 and Table 14.2 are observed, should be a minimum class D-s3, d2 rating. Otherwise they should meet the relevant classification in Table 6.1.Special applications6.9 Any flexible membrane covering a structure, other than an air-supported structure, should comply with Appendix A of BS 7157.6.10 Guidance on the use of PTFE-based materials for tension-membrane roofs and structures is given in BRE report BR 274.Fire behaviour of insulating core panels used internally6.11 Insulating core panels consist of an inner core of insulation sandwiched between, and bonded to, a membrane, such as galvanised steel or aluminium. Where they are used internally they can present particular problems with regard to fire spread, and should meet all of the following conditions.a. Panels should be sealed to prevent exposure of the core to a fire. This includes at joints and where services penetrate the panel.b. In high fire risk areas, such as kitchens, places of special fire hazard, or in proximity to where hot works occur, only class A1 cored panels should be used.c. Fixing systems for all panels should be designed to take account of the potential for the panel to delaminate. For instance, where panels are used to form a suspended ceiling, the fixing should pass through the panel and support it from the lower face.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 57B2Other controls on internal surface properties6.12 Guidance on the control of flame spread is given in the following sections.a. Stairs and landings: Section 3 (escape stairs) and Section 17 (firefighting shafts).b. Section 9: exposed surfaces above fire-protecting suspended ceilings.Thermoplastic materialsGeneral provisions6.13 Thermoplastic materials that do not meet the classifications in Table 6.1 can be used as described in paragraphs 6.14 to 6.18. No guidance for European fire test performance is currently available, because there is no generally accepted test and classification procedure.Thermoplastic materials are defined in Appendix B, paragraph B11. Classifications used here are explained in paragraph B13.Windows6.14 Thermoplastic material classified as a TP(a) rigid product may be used to glaze external windows to rooms, but not external windows to circulation spaces. Approved Document K includes guidance on the safety of glazing.Rooflights6.15 In rooms and circulation spaces other than protected stairways, rooflights may be constructed of thermoplastic material if they comply with both of the following.a. The lower surface is classified as TP(a) rigid or TP(b).b. The size and location of the rooflights follow the limits in Table 6.2 and in Table 14.2 and Table 14.3.Lighting diffusers6.16 The following paragraphs apply to lighting diffusers forming part of a ceiling. Diffusers may be part of a luminaire or used below sources of light. The following paragraphs do not apply to diffusers of light fittings attached to the soffit of a ceiling or suspended beneath a ceiling (Diagram 6.1).See para 6.16a. Diffuser forming part of ceilingb. Diffusers of light fittings attached to the soffit of a ceiling orsuspended beneath a ceilingCeilingCeilingSee para 6.16Diagram 6.1 Lighting diffuser in relation to ceilingONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION58 Approved Document B Volume 2, 2019 edition Building Regulations 2010B26.17 Diffusers constructed of thermoplastic material may be incorporated in ceilings to rooms and circulation spaces, but not to protected stairways, if both of the following conditions are met. a. Except for the upper surfaces of the thermoplastic panels, wall and ceiling surfaces exposed in the space above the suspended ceiling should comply with paragraph 6.1.b. Diffusers should be classified as one of the following.i. TP(a) rigid – no restrictions on their extent.ii. TP(b) – limited in their extent (see Table 6.2 and Diagram 6.2).Suspended or stretched‑skin ceilings6.18 A ceiling constructed from TP(a) flexible panels should meet the following conditions.a. Have a maximum area of 5m2.b. Be supported on all sides.See para 6.175m maximum dimension of group5m maximum dimension of group5m max.3m min.5m maximum dimension of group5m maximum dimension of group3m min.NOTES:1.2.3. Upper and lower surfaces of suspended ceiling, between plastic panels, to comply with paragraph 6.1. No restriction on class D-s3, d2 diffusers or rooflights in small rooms. See note 4 to Table 6.2.5m² is maximum areaof diffuser and rooflight inany one 5m5m groupSee para 6.17Rooflight ordiffuserSeparated groups ofrooflights or diffusersDiagram 6.2 Layout restrictions on class D-s3, d2 plastic rooflights, TP(b) rooflights and TP(b) lighting diffusersONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 59B2Table 6.2 Limitations applied to thermoplastic rooflights and lighting diffusers in suspended ceilings and class D-s3, d2 plastic rooflights(1)Minimum classification of lower surfaceUse of space below the diffusers or rooflightMaximum area of each diffuser or rooflight(2) (m2)Maximum total area of diffusers and rooflights as a percentage of floor area of the space in which the ceiling is located (%)Minimum separation distance between diffusers or rooflights(2) (m)TP(a)Any except protected stairwayNo limit(3)No limitNo limitD-s3, d2(4) or TP(b)Rooms150(5)(6)A distance equal to the largest plan dimension of the largest diffuser or rooflight (see Diagram 6.3)550(5)(6)3(6)Circulation spaces except protected stairways515(5)3NOTES:1. This table does not apply to products that meet the provisions in Table 6.1. 2. Smaller rooflights and diffusers can be grouped together provided that both of the following satisfy the dimensions in Diagram 6.2 or 6.3.a. The overall size of the group.b. The space between one group and any others.3. Lighting diffusers of TP(a) flexible rating should be used only in panels of a maximum of 5m2 each. See paragraph 6.18.4. There are no limits on the use of class D-s3, d2 materials in small rooms. See Table 6.1.5. The minimum 3m separation given in Diagram 6.2 between each 5m2 group must be maintained. Therefore, in some cases, it may not be possible to use the maximum percentage quoted.6. Class D-s3, d2 rooflights to rooms in industrial and other non-residential purpose group buildings (purpose groups 3 to 7) may be spaced 1800mm apart provided both of the following conditions are met.a. The rooflights are evenly distributed.b. The total area of the rooflights does not exceed 20% of the area of the room.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION60 Approved Document B Volume 2, 2019 edition Building Regulations 2010B2See Table 6.2y min.x min.y min.x min.Ceiling plandimension xdimension xdimension ySee Table 6.2Materials within this zone – at plane of ceiling – should comply with Table 6.1RooflightsDiagram 6.3 Layout restrictions on small class D-s3, d2 plastic rooflights, TP(b) rooflights and TP(b) lighting diffusersONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB3Building Regulations 2010 Approved Document B Volume 2, 2019 edition 61Requirement B3: Internal fire spread (structure)These sections deal with the following requirement from Part B of Schedule 1 to the Building Regulations 2010.RequirementRequirementLimits on applicationInternal fire spread (structure)B3. (1) The building shall be designed and constructed so that, in the event of fire, its stability will be maintained for a reasonable period (2) A wall common to two or more buildings shall be designed and constructed so that it adequately resists the spread of fire between those buildings. For the purposes of this sub-paragraph a house in a terrace and a semi-detached house are each to be treated as a separate building. (3) Where reasonably necessary to inhibit the spread of fire within the building, measures shall be taken, to an extent appropriate to the size and intended use of the building, comprising either or both of the following— (a) sub-division of the building with fire-resisting construction; (b) installation of suitable automatic fire suppression systems. (4) The building shall be designed and constructed so that the unseen spread of fire and smoke within concealed spaces in its structure and fabric is inhibited. Requirement B3(3) does not apply to material alterations to any prison provided under section 33 of the Prison Act 1952.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION62 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3IntentionIn the Secretary of State’s view, requirement B3 is met by achieving all of the following.a. For defined periods, loadbearing elements of structure withstand the effects of fire without loss of stability.b. Compartmentation of buildings by fire resisting construction elements.c. Automatic fire suppression is provided where it is necessary.d. Protection of openings in fire-separating elements to maintain continuity of the fire separation.e. Inhibition of the unseen spread of fire and smoke in cavities, to reduce the risk of structural failure and spread of fire and smoke, where they pose a threat to the safety of people in and around the building.The extent to which any of these measures are necessary is dependent on the use of the building and, in some cases, its size, and on the location of the elements of construction. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB3Building Regulations 2010 Approved Document B Volume 2, 2019 edition 63Section 7: Loadbearing elements of structureFire resistance standard7.1 Elements of structure such as structural frames, beams, columns, loadbearing walls (internal and external), floor structures and gallery structures should have, as a minimum, the fire resistance given in Appendix B, Table B3.7.2 Appendix B includes guidance on all of the following.a. Provisions to ensure that where one element of structure supports or stabilises another element of structure, the supporting element has no less fire resistance than the other element (see Table B4).b. Measures so that elements common to more than one building or compartment are constructed to the standard of the more onerous of the relevant provisions.c. Special provisions about fire resistance of elements of structure in single storey buildings.d. Concessions in respect of fire resistance of elements of structure in basements where one or more sides of the basement are open at ground level.Exclusions from the provisions for elements of structure7.3 The following are excluded from the definition of ‘element of structure’.a. A structure that supports only a roof, unless either of the following applies.i. The roof performs the function of a floor, such as for parking vehicles, or as a means of escape.ii. The structure is essential for the stability of an external wall that needs to be fire resisting (e.g. to achieve compartmentation or for the purposes of preventing fire spread between buildings).b. The lowest floor of the building.c. A platform floor.d. A loading gallery, fly gallery, stage grid, lighting bridge or any gallery provided for similar purposes or for maintenance and repair.e. External walls, such as curtain walls or other forms of cladding, which transmit only self weight and wind loads and do not transmit floor load.NOTE: In some cases, structural members within a roof may be essential for the structural stability system of the building. In these cases, the structural members in the roof do not just support a roof and must demonstrate the relevant fire resistance for the building as required by paragraph 7.2a above. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION64 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Additional guidance7.4 If a loadbearing wall is any of the following, guidance in other sections may also apply.a. A compartment wall (including a wall common to two buildings): Section 8.b. Enclosing a place of special fire hazard: Section 8, paragraph 8.7.c. Protecting a means of escape: Sections 2 to 5.d. An external wall: Sections 12 and 13.e. Enclosing a firefighting shaft: Section 17.7.5 If a floor is also a compartment floor, see Section 8.Raised storage areas7.6 The normal provisions for fire resistance may be too onerous to apply to raised, free-standing floors (sometimes supported by racking) in single storey buildings used for industrial and storage purposes. The introduction of raised storage areas can alter the effective number of storeys in the building (see the definition of ‘storey’ in Appendix A).7.7 A structure that does not have the minimum fire resistance specified in Appendix B, Table B4, is acceptable if it satisfies all of the following conditions.a. The structure meets both of the following conditions.i. It has only one tier.ii. It is used for storage purposes only.b. The people likely to be on the floor at any one time are both of the following.i. Few in number.ii. Not members of the public.c. The floor is open above and below to the room or space in which it is situated.d. The means of escape from the floor is in accordance with Sections 2 to 5.e. The floor meets both of the following conditions.i. It is not more than 10m in width or length.ii. It is a maximum of half the floor area of the space in which it is situated.The limitations in (e) may be adjusted if any of the following apply.f. If the lower level has an automatic fire detection and alarm system meeting the recommendations of BS 5839-1, then the floor size may be increased to not more than 20m in either width or length.g. If agreed with the building control body and the fire and rescue service, then it may be possible to vary this dimension and area. However, the safety of firefighters and the distance they may need to travel over or under the floor must be considered.h. If the building is fitted throughout with an automatic sprinkler system complying with Appendix E, then no limits are set for the size of the floor.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB3Building Regulations 2010 Approved Document B Volume 2, 2019 edition 65Section 8: Compartmentation/sprinklersProvision of compartmentationAll purpose groups8.1 All of the following should be provided as compartment walls and compartment floors and should have, as a minimum, the fire resistance given in Appendix B, Table B3. 8.2 A wall common to two or more buildings should be a compartment wall.8.3 Parts of a building occupied mainly for different purposes should be separated from one another by compartment walls and/or compartment floors. Compartmentation is not needed if one of the different purposes is ancillary to the other. See paragraphs 0.23 and 0.24.8.4 Effective compartmentation relies on both of the following.a. Fire resistance should be continuous at the join between elements forming a compartment.b. Any openings between two compartments should not reduce the fire resistance.8.5 The lowest floor in a building does not need to be a compartment floor.Protected shafts8.6 Stairs and service shafts connecting compartments should be protected to restrict the spread of fire between the compartments. These are called protected shafts. Walls or floors surrounding a protected shaft are considered to be compartment walls or compartment floors.Places of special fire hazard8.7 Fire resisting construction enclosing these places should achieve minimum REI 30. These walls and floors are not compartment walls and compartment floors.‘Residential (institutional)’ buildings including health care8.8 All floors should be constructed as compartment floors.8.9 Paragraphs 2.35 and 2.36 give guidance on the provisions for compartment walls in care homes that use progressive horizontal evacuation.‘Residential (other)’ buildings8.10 In ‘residential (other)’ (purpose group (2(b)) buildings, all floors should be compartment floors.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION66 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Non‑residential buildings8.11 In buildings in a non-residential purpose group (purpose groups 3 to 7), the following should be compartment walls and compartment floors.a. Every wall needed to divide the building to observe the compartment size limits in Table 8.1 (Diagram 8.1a).b. Every floor, if the building or separated part of the building (see paragraph 8.19) has a top storey that is more than 30m above ground level (Diagram 8.1b).c. The floor of the ground storey, if the building has one or more basements (Diagram 8.1c), except in small premises (see paragraph 4.2).d. The floor of every basement storey (except the lowest floor), if the building or separated part has a basement more than 10m below ground level (Diagram 8.1d).e. If the building comprises ‘shop and commercial’, ‘industrial’ or ‘storage’ premises (purpose groups 4, 6, 7): every wall or floor dividing a building into separate occupancies (spaces used by different organisations, whether they fall within the same purpose group or not).f. See also the provision in paragraph 5.46 for store rooms in shops to be separated from retail areas by fire resisting construction (minimum REI 30).8.12 In two storey ‘shop and commercial’ or ‘industrial’ buildings (purpose groups 4 or 6), where the use of the upper storey is ancillary to the use of the ground storey, the ground storey may be treated as a single storey building for fire compartmentation purposes where all of the following apply.a. The area of the upper storey does not exceed the lower of:i. 20% of the area of the ground storeyii. 500m2.b. The upper storey is compartmented from the lower one.c. The upper storey has a means of escape independent of the lower storey escape routes.Every place of special fire hazard (see Appendix E) should be enclosed with fire resisting construction.Buildings containing one or more atria8.13 Detailed advice on atria in buildings is given in Annexes B and C of BS 9999. For the purposes of this document, BS 9999 applies only where the atrium breaches a compartment.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 67B3See para 8.11Only the floor of the groundstorey need be a compartmentfloor if the lower basement isat a depth of not more than 10m.All basement storeys to beseparated by compartmentfloors if any storey is at adepth of more than 10m.In a building with a top storeyover 30m in height allstoreys should be separated bycompartment floors. Foradvice on the special conditionsin atrium buildings seeAnnex B of BS 9999.None of the floors in this case would need tobe compartment floors, but the two storeysexceeding 2000m² would need to be dividedinto compartments not more than 2000m² bycompartment walls.The compartment walls in example (a) do notneed to be in one vertical plane.30mmax.RoofCompartmentwallCompartmentwallStorey not exceeding2000m²Storey not exceeding2000m²Storey exceeding2000m² divided bycompartment wallStorey exceeding2000m² divided bycompartment wall10mmax.> 10m> 30ma. Example of compartmentation in an unsprinklered assembly and recreation, shop, or commercial building see paragraph 8.11ab. Compartmentation in buildings over 30m see paragraph 8.11bd. Deep basement see paragraph 8.11dc. Shallow basement see paragraph 8.11cSee para 8.11Compartment floor(s) or wall(s)Diagram 8.1 Compartment floors: illustration of guidance in paragraph 8.11ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION68 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Table 8.1 Maximum dimensions of building or compartment (non-residential buildings) Purpose group of building or partHeight of floor of top storey above ground level (m)Maximum floor area of any one storey in the building or any one storey in a compartment (m2)Single storey buildingsMulti-storey buildingsOfficeNo limit(1)No limitNo limitAssembly and recreation, shop and commercial: a. Shops – without sprinkler systemNo limit(1)20002000Shops – with sprinkler system(2)No limitNo limit4000b. Elsewhere – without sprinkler systemNo limit(1)No limit2000Elsewhere – with sprinkler system(2)No limitNo limit4000Industrial(3) Without sprinkler system(1) Not more than 18 More than 18 No limit N/A 7000 2000(4)With sprinkler system(2)Not more than 18 More than 18No limit N/A14,000 4000(4)Height of floor of top storey above ground level (m)Maximum floor area (m2)Maximum height (m)(5)Maximum compartment volume (m3)Single storey buildingsMulti-storey buildingsStorage(3) and other non-residential:a. Car park for light vehiclesNo limitNo limitNo limitNo limitb. Any other building or part:Without sprinkler system(1)Not more than 18 More than 1820,000 N/A18 N/A20,000 4000(4)With sprinkler system(2)Not more than 18 More than 18No limitNo limit40,000 8000(4)NOTES:This table recommends that where the maximum size limitations placed on a building without a sprinkler system are exceeded, a sprinkler system in accordance with Appendix E should be provided. 1. See Appendix B, Table B4 for sprinkler system height requirements.2. ‘With sprinkler system’ means that the building is fitted throughout with an automatic sprinkler system in accordance with Appendix E.3. In certain industrial and storage uses that are subject to other legislation, for example the storage of LPG and certain chemicals, additional limitations on floor area and/or additional sprinkler provisions might apply.4. This reduced limit applies only to storeys that are a minimum of 18m above ground level. Below this height the higher limit applies.5. Compartment height is measured from finished floor level to the underside of the roof or ceiling.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 69B3Sprinklers8.14 Buildings within the ‘office’, ‘shop and commercial’, ‘assembly and recreation’, ‘industrial’ and ‘storage and other non-residential’ (except car parks for light vehicles) purpose groups (purpose groups 3 to 7(a)) require sprinklers where there is a top storey above 30m. The sprinkler system should be provided in accordance with Appendix E.Construction of compartment walls and compartment floorsGeneral provisions8.15 All compartment walls and compartment floors should achieve both of the following.a. Form a complete barrier to fire between the compartments they separate.b. Have the appropriate fire resistance, as given in Appendix B, Tables B3 and B4.8.16 Timber beams, joists, purlins and rafters may be built into or carried through a masonry or concrete compartment wall if the openings for them are both of the following.a. As small as practicable.b. Fire-stopped. If trussed rafters bridge the wall, failure of the truss due to a fire in one compartment should not cause failure of the truss in another compartment.8.17 Where services could provide a source of ignition, the risk of fire developing and spreading into adjacent compartments should be controlled.Compartment walls between buildings8.18 Adjoining buildings should only be separated by walls, not floors. Compartment walls common to two or more buildings should comply with both of the following.a. Run the full height of the building in a continuous vertical plane.b. Be continued through any roof space to the underside of the roof.Separated parts of buildings8.19 Compartment walls forming a separated part of a building should run the full height of the building in a continuous vertical plane. Separated parts can be assessed independently to determine the appropriate standard of fire resistance in each. The two separated parts can have different standards of fire resistance.Other compartment walls8.20 Compartment walls not described in paragraphs 8.18 and 8.19 should run the full height of the storey in which they are situated.8.21 Compartment walls in a top storey beneath a roof should be continued through the roof space.Junction of compartment wall or compartment floor with other walls8.22 At the junction with another compartment wall or an external wall, the fire resistance of the compartmentation should be maintained. Fire-stopping that meets the provisions in paragraphs 10.24 to 10.29 should be provided.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION70 Approved Document B Volume 2, 2019 edition Building Regulations 2010B38.23 At the junction of a compartment floor and an external wall with no fire resistance, the external wall should be restrained at floor level. The restraint should reduce movement of the wall away from the floor if exposed to fire.8.24 Compartment walls should be able to accommodate deflection of the floor, when exposed to fire, by either of the following means.a. Between the wall and floor, provide a head detail that is capable of maintaining its integrity while deforming.b. Design the wall so it maintains its integrity by resisting the additional vertical load from the floor above.Where compartment walls are located within the middle half of a floor between vertical supports, the deflection may be assumed to be 40mm unless a smaller value can be justified by assessment. Outside this area, the limit can be reduced linearly to zero at the supports. For steel beams that do not have the required fire resistance, reference should be made to SCI Publication P288.Junction of compartment wall with roof8.25 A compartment wall should achieve both of the following.a. Meet the underside of the roof covering or deck, with fire-stopping to maintain the continuity of fire resistance.b. Be continued across any eaves.8.26 To reduce the risk of fire spreading over the roof from one compartment to another, a 1500mm wide zone of the roof, either side of the wall, should have a covering classified as BROOF(t4), on a substrate or deck of a material rated class A2-s3, d2 or better, as set out in Diagram 8.2a. Thermoplastic rooflights that, because of paragraph 14.7, are regarded as having a BROOF(t4) classification are not suitable for use in that zone.8.27 Materials achieving class B-s3, d2 or worse used as a substrate to the roof covering and any timber tiling battens, fully bedded in mortar or other suitable material for the width of the wall (Diagram 8.2b), may extend over the compartment wall in buildings that are both of the following.a. A maximum of 15m high.b. In one of the following purpose groups.i. All residential purpose groups (purpose groups 1 and 2) other than ‘residential (institutional)’ (purpose group 2(a)).ii. ‘Office’ (purpose group 3).iii. ‘Assembly and recreation’ (purpose group 5).8.28 Double-skinned insulated roof sheeting should incorporate a band of material rated class A2-s3, d2 or better, a minimum of 300mm in width, centred over the wall.8.29 As an alternative to the provisions of paragraph 8.26 or 8.27, the compartment wall may extend through the roof for a minimum of either of the following (see Diagram 8.2c).a. Where the height difference between the two roofs is less than 375mm, 375mm above the top surface of the adjoining roof covering.b. 200mm above the top surface of the adjoining roof covering where either of the following applies.i. The height difference between the two roofs is 375mm or more.ii. The roof coverings either side of the wall are of a material classified as BROOF(t4).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 71B3See paras 8.26 to 8.29XXThe wall should be extended up through the roof for a height of at least 375mm above the top surface of the adjoining roof covering. Where there is a height difference of at least 375 mm between two roofs or where the roof coverings on either side of the wall are BROOF(t4) rated, the height of the upstand/parapet wall above the highest roof may be reduced to 200mm.Roof covering to be designated BROOF(t4) rated for at least this distance.Boarding (used as a substrate) or timber tiling battens may be carried over the wall provided that they are fully bedded in mortar (or other no less suitable material) where over the wall. Thermoplastic insulation materials should not be carried over the wall. Double-skinned insulated roof sheeting with a thermoplastic core should incorporate a band of material of class A2-s3, d2 at least 300mm wide centred over the wall.Sarking felt may also be carried over the wall.If roof support members pass through the wall, fire protection to these members for a distance of 1500mm on either side of the wall may be needed to delay distortion at the junction (see paragraph 8.16).Fire-stopping to be carried up to underside of roof covering, boarding or slab.Roof covering over this distance to be designated BROOF(t4) rated on deck of material of class A2-s3, d2 or better. Roof covering and deck could be composite structure, e.g. profiled steel cladding.Double-skinned insulated roof sheeting should incorporate a band of material rated class A2-s3, d2 or better, a minimum of 300mm in width, centred over the wall.If roof support members pass through the wall, fire protection to these members for a distance of 1500mm on either side of the wall may be needed to delay distortion at the junction (see paragraph 8.16).Fire-stopping to be carried up to underside of roof covering, e.g. roof tiles.c. ANY BUILDING OR COMPARTMENTb. RESIDENTIAL (OTHER), OFFICE, OR ASSEMBLY AND RECREATION USE, AND NOT MORE THAN 15M HIGHa. ANY BUILDING OR COMPARTMENTSection X–XRoof coveringRoof coveringWallWallWall1500mm1500mm1500mm1500mmAt least375mmAt least375mmRoof covering to be designated BROOF(t4) rated for at least 1500mm either side of wall.Roofing battens and sarking felt may be carried over the wall.Fire-stopping to be carried up to underside of roof covering above and below sarking felt.NOTES: 1. Fire-stopping should be carried over the full thickness of the wall.2. Fire-stopping should be extended into any eaves.3. The compartment wall does not necessarily need to be constructed of masonry.Diagram 8.2 Junction of compartment wall with roofONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION72 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Openings in compartmentationOpenings in compartment walls separating buildings or occupancies8.30 Openings in a compartment wall common to two or more buildings, or between different occupancies in the same building, should be limited to those for either of the following.a. A fire doorset providing a means of escape, which has the same fire resistance as the wall and is fitted in accordance with the provisions in Appendix C.b. The passage of a pipe that complies with the provisions in Section 10.Openings in other compartment walls or in compartment floors8.31 Openings should be limited to those for any of the following.a. Fire doorsets fitted in accordance with the provisions in Appendix C.b. Pipes, ventilation ducts, service cables, chimneys, appliance ventilation ducts or ducts encasing one or more flue pipes, complying with the provisions in Section 10.c. Refuse chutes of class A1 construction.d. Atria designed in accordance with Annexes B and C of BS 9999.e. Protected shafts that conform to the provisions in the following paragraphs.Protected shafts8.32 Any stair or other shaft passing directly from one compartment to another should be enclosed in a protected shaft. Protected shafts should be used for the following only, but may also include sanitary accommodation and washrooms.a. Stairs.b. Lifts.c. Escalators.d. Chutes.e. Ducts.f. Pipes. g. Additional provisions apply for both of the following.i. Protected shafts that are protected stairways: Sections 2 to 5.ii. Stairs that are also firefighting stairs: Section 17.Construction of protected shafts8.33 The construction enclosing a protected shaft (Diagram 8.3) should do all of the following.a. Form a complete barrier to fire between the compartments connected by the shaft.b. Have the appropriate fire resistance given in Appendix B, Table B3, except for uninsulated glazed screens that meet the provisions of paragraph 8.34.c. Satisfy the provisions for ventilation and the treatment of openings in paragraphs 8.38 and 8.39.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 73B3See para 8.33This diagram shows three common examples which illustrate the principles of the constructionof protected shafts. The elements enclosing the shaft (unless formed by adjacent external walls)are compartment walls and floors. The shaft structure (including any openings) should meet the relevant provisions for both of the following:compartment walls (see paragraphs 8.15 to 8.31) and external walls (see Sections 12 and 13 and Diagram 3.3).External wallCompartment wallProtected shaft Ais bounded on threesides by compartmentwalls and on the fourthside by an external wallProtected shaft Bis bounded on foursides by compartmentwallsProtected shaft Cis a services ductbounded on four sidesby compartment wallsABCSee para 8.33FdFdFdFdFire doorsetFdDiagram 8.3 Construction of protected shaftsUninsulated glazed screens to protected shafts8.34 An uninsulated glazed screen may be incorporated in the enclosure to a protected shaft between a stair and a lobby or corridor entered from the stair. The enclosure must conform to Diagram 8.4 and meet all of the following conditions.a. The standard of fire resistance required for the protected stairway is not more than REI 60.b. The glazed screen complies with the following.i. It achieves a minimum rating of E 30.ii. It complies with the guidance on limits on areas of uninsulated glazing in Appendix B, Table B5.c. The lobby or corridor is enclosed with fire resisting construction achieving a minimum rating of REI 30.8.35 Where the measures in Diagram 8.4 are not provided, then both of the following apply.a. The enclosing walls should comply with Appendix B, Table B3.b. The doors should comply with Appendix B, Table B5.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION74 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3paras 8.34 and 8.35a. With corridorb. With lobbySee para 8.34Fire resistance of protected shaftto be a maximum of REI 60Fire resistance of constructionto be a minimum of REI 30Fire resistance of glazed screen to bea minimum of RE 30External wallFire doorsets that area minimum of E 30 SaProtectedshaftProtectedshaftProtectedlobbyCorridorUninsulatedglazed screen(minimum RE 30)Uninsulatedglazed screen(minimum RE 30)Diagram 8.4 Uninsulated glazed screen separating protected shaft from lobby or corridorPipes for oil or gas and ventilation ducts in protected shafts8.36 A protected shaft containing a protected stairway and/or a lift should not also contain either of the following.a. A pipe that conveys oil, other than in the mechanism of a hydraulic lift.b. A ventilating duct. Two exceptions are as follows.i. A duct provided for pressurising the protected stairway to keep it smoke free.ii. A duct provided only to ventilate the protected stairway.A pipe that is completely separated from a protected shaft by fire resisting construction is not considered to be contained within that shaft.8.37 In a protected shaft, any pipe carrying natural gas or LPG should be both of the following.a. Of screwed steel or all-welded steel construction.b. Installed in accordance with both of the following.i. The Pipelines Safety Regulations 1996.ii. The Gas Safety (Installation and Use) Regulations 1998.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 75B3Ventilation of protected shafts conveying gas8.38 A protected shaft conveying piped flammable gas should be ventilated direct to the outside air, by ventilation openings at high and low level in the shaft.Any extension of the storey floor into the protected shaft should not compromise the free movement of air throughout the entire length of the shaft. Guidance on shafts conveying piped flammable gas, including the size of ventilation openings, is given in BS 8313.Openings into protected shafts8.39 The external wall of a protected shaft does not normally need to have fire resistance. Situations where there are provisions are given in paragraph 3.29 (external walls of protected stairways, which may also be protected shafts) and paragraph 17.2 (firefighting shafts).Openings in other parts of the enclosure to a protected shaft should be limited to the following.a. If a wall common to two or more buildings forms part of the enclosure, only the following openings should be made in that wall.i. A fire doorset providing a means of escape, which has the same fire resistance as the wall and is fitted in accordance with the provisions in Appendix C.ii. The passage of a pipe that meets the provisions in Section 10.b. Other parts of the enclosure (other than an external wall) should only have openings for any of the following.i. Fire doorsets of the appropriate fire resistance, fitted in accordance with the provisions in Appendix C.ii. The passage of pipes which meet the provisions in Section 10.iii. Inlets to, outlets from and openings for a ventilation duct (if the shaft contains or serves as a ventilating duct), meeting the provisions in Section 10.iv. The passage of lift cables into a lift machine room (if the shaft contains a lift). If the machine room is at the bottom of the shaft, the openings should be as small as practicable. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB376 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 9: Cavities9.1 Cavities in the construction of a building provide a ready route for the spread of smoke and flame, which can present a greater danger as any spread is concealed. For the purpose of this document, a cavity is considered to be any concealed space. See para 9.2Roof cavityAccommodationAccommodationAccommodationCompartment wallWall formingbedroom(1) or protectedescape route(2)Wall formingbedroom(1) or protectedescape route(2)Sub-divideextensive cavitiesSub-divideextensive cavitiesCompartment wallSub-divideextensive cavitiesCavity barrieraround edgesCavity barrierat top of cavityCavity barrier atcompartment floorCavity barrier atbottom of cavityCavity barrieraround openingsCompartment wallFloor cavityCeiling cavityCompartment floorFloor cavityCompartment floorCeiling cavityFire-stopping(same resistance as compartment)Cavity barriersNOTES:1. See paragraph 9.7.2. See paragraph 9.5.Diagram 9.1 Provisions for cavity barriersONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 77B3Provision of cavity barriers9.2 To reduce the potential for fire spread, cavity barriers should be provided for both of the following.a. To divide cavities.b. To close the edges of cavities.See Diagram 9.1. Cavity barriers should not be confused with fire-stopping details (Section 10).Pathways around fire‑separating elementsJunctions and edges of cavities9.3 Cavity barriers should be provided at all of the following locations.a. At the edges of cavities, including around openings (such as windows, doors and exit/entry points for services).b. At the junction between an external cavity wall and every compartment floor and compartment wall.c. At the junction between an internal cavity wall and every compartment floor, compartment wall or other wall or door assembly forming a fire resisting barrier.This does not apply where a wall meets the conditions of Diagram 9.2.9.4 It is not appropriate to complete a line of compartment walls by fitting cavity barriers above them. The compartment wall should extend to the underside of the floor or roof above.Protected escape routes9.5 If the fire resisting construction of a protected escape route is either of the following.a. Not carried to full storey height.b. At the top storey, not carried to the underside of the roof covering.Then the cavity above or below the fire resisting construction should be either of the following.i. Fitted with cavity barriers on the line of the enclosure.ii. For cavities above the fire resisting construction, enclosed on the lower side by a fire resisting ceiling (minimum EI 30) that extends throughout the building, compartment or separated part (see Diagram 9.3).Cavities affecting alternative escape routes9.6 In divided corridors, cavity barriers may be needed to prevent alternative escape routes being affected by fire and/or smoke (see paragraph 2.27 and Diagram 2.9).Separation of bedrooms in ‘residential (institutional)’ and ‘residential (other)’ buildings9.7 Where a cavity exists above or below a partition between bedrooms because the enclosure is not carried to full storey height or to the underside of the roof covering, the guidance in paragraph 9.5 should be followed. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION78 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Double‑skinned corrugated or profiled roof sheeting9.8 Cavity barriers are not required between double-skinned corrugated or profiled insulated roof sheeting if the sheeting complies with all of the following.a. The sheeting is rated class A2-s3, d2 or better.b. Both surfaces of the insulating layer are rated class C-s3, d2 or better.c. Both surfaces of the insulating layer make contact with the inner and outer skins of cladding (Diagram 9.4).See para 9.3NOTES:1. Materials used to close the cavity in this arrangement do not need to achieve a specific performance in relation to fire resistance. 2. Domestic meter cupboards may be installed provided that the following conditions are met: a. There are no more than two cupboards per dwelling b. The openings in the outer wall leaf are not bigger than 800500mm for each cupboard c. The inner leaf is not penetrated except by a sleeve not more than 8080mm, which is fire-stopped.3. Materials achieving class B-s3, d2 or worse may be placed within the cavity.OpeningClose cavity around openingClose cavity at top of wall(unless cavity is totallyfilled with insulation)Two leaves of brick orconcrete each at least 75mmthickSee para 9.3Diagram 9.2 Cavity walls excluded from provisions for cavity barriersSee para 9.5Ceiling surface/product exposed tocavity – class C-s3, d2 or betterSoffit of ceiling – class B-s3, d2 or betterThe ceiling should meet all of the following conditions. Provide a minimum fire resistance of EI 30. Be imperforate, except for an opening described in paragraph 9.17. Extend throughout the building or compartment. Not be easily demountable.NOTE:Ta.b.c.d.See para 9.5CeilingCavityFloor or roof aboveDiagram 9.3 Fire resisting ceiling below cavityONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 79B3See para 9.8Acceptable without cavity barriersCavity barriers necessaryThe insulation should make contact with both skins of sheeting. See also Diagram 8.2a regarding the need for fire-stoppingwhere such roofs pass over the top of a compartment wall.Arrangement AArrangement BCavity barrierInsulationDiagram 9.4 Provisions for cavity barriers in double-skinned insulated roof sheetingExtensive cavitiesMaximum dimensions of cavities9.9 Cavity barriers should be used to divide any cavity (including roof spaces). Table 9.1 sets out maximum dimensions for undivided cavities.Table 9.1 Maximum dimensions of cavities in buildings other than dwellings (purpose groups 2 to 7) Location of cavity Class of surface/product exposed in cavity (excluding the surface of any pipe, cable or conduit, or any insulation to any pipe)Maximum dimension in any direction (m)Between roof and a ceilingAny20Any other cavityClass C-s3, d2 or better20Worse than Class C-s3, d2109.10 Table 9.1 does not apply to any of the following cavities.a. A cavity in a wall that is fire resisting only because it is loadbearing.b. A cavity in a wall that meets the conditions of Diagram 9.2.c. A floor or roof cavity above a fire resisting ceiling (Diagram 9.3) that extends throughout the building or compartment to a maximum of 30m.d. In a building not put to residential or institutional use, a cavity that does not contain materials achieving class B-s3, d2 or worse and is formed either:i. behind the external skin of an external cladding system with a masonry or concrete inner leaf a minimum of 75mm thickii. by overcladding an existing masonry (or concrete) external wall or an existing concrete roof.e. A cavity that meets the conditions of paragraph 9.8.f. A cavity below a floor next to the ground or next to oversite concrete, if either:ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION80 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3i. the cavity is less than 1000mm in heightii. the cavity is not normally accessible by people, unless there are openings in the floor such that it is possible for materials to accumulate in the cavity (in which case cavity barriers should be provided and access should be provided to the cavity for cleaning).9.11 If a single room with a ceiling cavity or underfloor cavity exceeds the dimensions in Table 9.1, cavity barriers need only be provided on the line of the enclosing walls/partitions of that room, if both of the following apply.a. The cavity barriers are a maximum of 40m apart.b. The surface of the material/product exposed in the cavity is class C-s3, d2 or better.9.12 If the cavity is over an undivided area that exceeds 40m in any direction, there is no limit to its size if all of the following conditions are met. a. Together, the room and cavity form a compartment separated from the rest of the building.b. Both of the following apply.i. The building is fitted with an automatic fire detection and alarm system that conforms to BS 5839-1.ii. Detectors are only required in the cavity to satisfy BS 5839-1.c. If the cavity is used as a plenum then the recommendations for recirculating air distribution systems in Section 32 of BS 9999 are followed.d. Both of the following apply.i. The exposed surface of the material/product used in the construction of the cavity is class B-s3, d2 or better.ii. The supports and fixings in the cavity are class A1.e. Any pipe insulation system should achieve class C-s3, d2 rating or better.f. Any electrical wiring in the cavity is laid in metal trays or metal conduit.g. Other than those in (d)–(f), any materials are class A2-s3, d2 rated or better.Construction and fixings for cavity barriers9.13 Cavity barriers, tested from each side separately, should provide a minimum of both of the following: a. 30 minutes’ integrity (E 30)b. 15 minutes’ insulation (I 15).They may be formed by a construction provided for another purpose if it achieves the same performance.9.14 Cavity barriers in a stud wall or partition, or provided around openings, may be formed of any of the following. a. Steel, a minimum of 0.5mm thick. b. Timber, a minimum of 38mm thick. c. Polythene-sleeved mineral wool, or mineral wool slab, under compression when installed in the cavity.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 81B3d. Calcium silicate, cement-based or gypsum-based boards, a minimum of 12mm thick.These do not necessarily achieve the performance specified in paragraph 9.13. NOTE: Cavity barriers provided around openings may be formed by the window or door frame if the frame is constructed of steel or timber of the minimum thickness in (a) or (b), as appropriate. 9.15 Cavity barriers should be tightly fitted to a rigid construction and mechanically fixed in position. If this is not possible (e.g. where a cavity barrier joins to slates, tiles, corrugated sheeting or similar materials) the junction should be fire-stopped.9.16 Cavity barriers should be fixed so their performance is unlikely to be made ineffective by any of the following.a. Movement of the building due to subsidence, shrinkage or temperature change, and movement of the external envelope due to wind.b. During a fire, collapse of services penetrating the cavity barriers, either by the failure of the supporting system or through degradation of the service itself (e.g. by melting or burning).c. During a fire, failure of the cavity barrier fixings. (In roof spaces, where cavity barriers are fixed to roof members, there is no expectation of fire resistance from roof members provided for the purpose of support.)d. During a fire, failure of any material or construction to which cavity barriers abut. (For example, a suspended ceiling that continues over a fire resisting wall or partition collapses, and the cavity barrier fails prematurely because the ceiling was not designed to provide a minimum fire resistance of EI 30.)Openings in cavity barriers9.17 Openings should be limited to the following.a. Fire doorsets with a minimum rating of E 30, fitted in accordance with Appendix C.b. The passage of pipes that follow the provisions in Section 10.c. The passage of cables or conduits containing one or more cables.d. Openings fitted with a suitably mounted and appropriate fire damper.e. Ducts that are either of the following.i. Fire resisting (minimum E 30).ii. Fitted with a suitably mounted and appropriate fire damper where they pass through the cavity barrier.9.18 If a cavity barrier is provided above or below a partition between bedrooms in ‘residential (institutional)’ and ‘residential (other)’ (purpose groups 2(a) and 2(b)) buildings, and the partition is not a fire resisting partition, then paragraph 9.17 does not apply. However, both of the following apply.a. The number of openings in the barrier should be kept to a minimum.b. Any penetrations should be sealed to restrict the passage of smoke with an appropriate fire-stopping material.NOTE: For further guidance on openings in cavity barriers see Section 10.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB382 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 10: Protection of openings and fire‑stoppingIntroduction10.1 Every joint, imperfect fit and opening for services through a fire-separating element should be sealed with fire-stopping to ensure the fire resistance of the element is not impaired. Fire-stopping delays the spread of fire and, generally, the spread of smoke as well. Openings for pipes10.2 Pipes passing through a fire-separating element, unless in a protected shaft, should comply with one of the alternatives A, B or C below.Alternative A: Proprietary seals (any pipe diameter)10.3 Provide a proprietary, tested sealing system that will maintain the fire resistance of the wall, floor or cavity barrier.Alternative B: Pipes with a restricted diameter10.4 Where a proprietary sealing system is not used, fire-stop around the pipe, keeping the opening for the pipe as small as possible. The nominal internal diameter of the pipe should not exceed the relevant dimension given in Table 10.1. Alternative C: Sleeving10.5 A pipe with a maximum nominal internal diameter of 160mm may be used with a sleeve made out of a high melting point metal, as shown in Diagram 10.1, if the pipe is made of one of the following.a. Lead.b. Aluminium.c. Aluminium alloy.d. Fibre-cement.e. uPVC (pipes should also comply with either BS 4514 or BS 5255).A high melting point metal means any metal (such as cast iron, copper or steel) which, if exposed to a temperature of 800°C, will not soften or fracture to the extent that flame or hot gas will pass through the wall of the pipe.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 83B3See para 10.5 Make the opening in the fire-separating element as small as possible and provide fire-stopping between pipe and fire-separating element. See Table 10.1 for materials specification. The sleeve should be class A1 rated.NOTES:1.2.3.Fire-separating element≥ 1000mm≥ 1000mmPipe specification (b)Sleeve (or pipe)of specification (a)to be in contactwith pipeFire-stoppingSee para 10.5Diagram 10.1 Pipes penetrating fire-separating elementsTable 10.1 Maximum nominal internal diameter of pipes passing through a fire-separating element Situation Pipe material and maximum nominal internal diameter (mm)(a)High melting point metal(1)(b)Lead, aluminium, aluminium alloy, uPVC(2), fibre-cement(c)Any other material1. Structure (but not a wall separating buildings) enclosing a protected shaft that is not a stairway or a lift shaft160110402. Any other situation1604040NOTES:1. Any metal (such as cast iron, copper or steel) which, if exposed to a temperature of 800°C, will not soften or fracture to the extent that flame or hot gas will pass through the wall of the pipe.2. uPVC pipes that comply with either BS 4514 or BS 5255.Mechanical ventilation and air‑conditioning systemsGeneral provisions10.6 Ductwork should not help to transfer fire and smoke through the building. Terminals of exhaust points should be sited away from final exits, cladding or roofing materials achieving class B-s3, d2 or worse and openings into the building.10.7 Ventilation ducts supplying or extracting air directly to or from a protected stairway should not also serve other areas. A separate ventilation system should be provided for each protected stairway.10.8 A fire and smoke damper should be provided where ductwork enters or leaves each section of the protected escape route it serves. It should be operated by a smoke detector or suitable fire detection system. Fire and smoke dampers should close when smoke is detected. Alternatively, the methods set out in paragraphs 10.15 and 10.16 and Diagrams 10.2 and 10.3 may be followed. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION84 Approved Document B Volume 2, 2019 edition Building Regulations 2010B310.9 In a system that recirculates air, smoke detectors should be fitted in the extract ductwork before both of the following.a. The point where recirculated air is separated from air to be discharged to the outside.b. Any filters or other air cleaning equipment. When smoke is detected, detectors should do one of the following. a. Cause the system to immediately shut down.b. Switch the ventilation system from recirculating mode to extraction to divert smoke outside the building.10.10 Non-domestic kitchens, car parks and plant rooms should have separate and independent extraction systems. Extracted air should not be recirculated.10.11 Under fire conditions, ventilation and air-conditioning systems should be compatible with smoke control systems and need to be considered in their respective design.Ventilation ducts and flues passing through fire‑separating elementsGeneral provisions10.12 If air handling ducts pass through fire-separating elements, the fire performance of the elements should be maintained using one or more of the following four methods. In most ductwork systems, a combination of the four methods is best. a. Method 1 – thermally activated fire dampers. b. Method 2 – fire resisting enclosures. c. Method 3 – protection using fire resisting ductwork. d. Method 4 – automatically activated fire and smoke dampers triggered by smoke detectors. 10.13 Further information on fire resisting ductwork is given in the ASFP Blue Book.Kitchen extract 10.14 Methods 1 and 4 should not be used for extract ductwork serving kitchens. The likely build-up of grease within the duct can adversely affect dampers.Ducts passing through protected escape routes10.15 Method 1 should not be used for extract ductwork passing through the enclosures of protected escape routes (Diagrams 10.2 and 10.3), as large volumes of smoke can pass thermal devices without triggering them.10.16 An ES classified fire and smoke damper which is activated by a suitable fire detection system (method 4) may also be used for protected escape routes. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 85B3See para 10.15FdFdFdDuctworkserving areaDuctworkserving areaNOTE: Ventilation ducts which serve other parts of the building should not supply or extract air directly to or from a protected escape route.See para 10.15Ductworkserving areaDuctwork enclosed in fire resistingconstruction classified EI X in accordancewith BS EN 13501-2 (fire exposure from theduct side), or fire resisting ductworkclassified EIS X in accordance withBS EN 13501-3, where X is the fireresistance rating (in minutes) of thewalls of the protected escape routeProtected stairwayFdFire doorsetProtected lobbyLorem ipsumDiagram 10.2 Ductwork passing through protected escape routes – method 2 or method 3See para 10.15NOTE: Ventilation ducts which serve other parts of the building should not supply or extract air directly to or from a protected escape route.SDFdFdFdSee para 10.15Ductworkserving areaSDDuctworkserving areaSDES leakage rated fire and smoke damperconforming to BS EN 13501-3/BS EN 1366-2Protected stairwaySmoke detection system in accordance withBS 5839-1 to activate ES damperFdFire doorsetProtected lobbyLorem ipsumDiagram 10.3 Ductwork passing through protected escape routes – method 4ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION86 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Installation and specification of fire dampers 10.17 Both fire dampers and fire and smoke dampers should be all of the following.a. Sited within the thickness of the fire-separating elements.b. Securely fixed.c. Sited such that, in a fire, expansion of the ductwork would not push the fire damper through the structure.10.18 Access to the fire damper and its actuating mechanism should be provided for inspection, testing and maintenance.10.19 Fire dampers should meet both of the following conditions.a. Conform to BS EN 15650.b. Have a minimum E classification of 60 minutes or to match the integrity rating of the fire resisting elements, whichever is higher.10.20 Fire and smoke dampers should meet both of the following conditions.a. Conform to BS EN 15650.b. Have a minimum ES classification of 60 minutes or to match the integrity rating of the fire resisting elements, whichever is higher.10.21 Smoke detectors should be sited so as to prevent the spread of smoke as early as practicable by activating the fire and smoke dampers. Smoke detectors and automatic release mechanisms used to activate fire dampers and/or fire and smoke dampers should conform to BS EN 54-7 and BS 5839-3 respectively.Further information on fire dampers and/or fire and smoke dampers is given in the ASFP Grey Book.Sleeping risks10.22 Where the use of the building involves a sleeping risk, fire dampers or fire and smoke dampers should be actuated by both of the following.a. Smoke detector-controlled automatic release mechanisms.b. Thermally actuated devices.However, in a situation where both of the following are true:a. all occupants of the building can be expected to make an unaided escape b. an L1 fire detection and alarm system is installed in accordance with BS 5839-1then both of the following exceptions may be made.i. If, on the detection of smoke, the fire alarm system signals the immediate evacuation of all the occupants of the building, then fire dampers and/or fire and smoke dampers do not need to be actuated by smoke detectors.ii. If the building is divided into fire compartments and the alarm system is arranged to signal the immediate evacuation of the occupants of the fire compartment in which the fire has been detected, then smoke detector-operated fire dampers or fire and smoke dampers need only be provided where ductwork enters or leaves the fire compartment.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 87B3Flues, etc.10.23 The wall of a flue, duct containing flues or appliance ventilation duct(s) should have a fire resistance (REI) that is at least half of any compartment wall or compartment floor it passes through or is built into (Diagram 10.4).See para 10.23Compartmentwall or floorCompartmentwallCompartmentwallFlueFlue walla. Flue passing through compartment wall or floorb. Flue built into compartment wallFlue walls should have a fire resistance of at least one half of that required for the compartment wall or floor and be of class A1 construction.In each case flue walls should have a fire resistance of at leastone half of that required for the compartment wall and be ofclass A1 construction.See para 10.23Diagram 10.4 Flues penetrating compartment walls or floorsFire‑stopping10.24 In addition to any other provisions in this section, both of the following conditions should be met.a. Joints between fire-separating elements should be fire-stopped.b. Openings through a fire resisting element for pipes, ducts, conduits or cable should be all of the following.i. As few as possible.ii. As small as practicable.iii. Fire-stopped (allowing thermal movement in the case of a pipe or duct).NOTE: The fire-stopping around fire dampers, fire resisting ducts, fire and smoke dampers and smoke control ducts should be in accordance with the manufacturer or supplier’s installation instructions.10.25 Materials used for fire-stopping should be reinforced with (or supported by) materials rated class A2-s3, d2 or better to prevent displacement in both of the following cases.a. Where the unsupported span is greater than 100mm.b. Where non-rigid materials are used (unless subjected to appropriate fire resistance testing to show their suitability).10.26 Proprietary, tested fire-stopping and sealing systems are available and may be used. Different materials suit different situations and not all are suitable in every situation.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION88 Approved Document B Volume 2, 2019 edition Building Regulations 2010B310.27 Other fire-stopping materials include the following.a. Cement mortar.b. Gypsum-based plaster.c. Cement-based or gypsum-based vermiculite/perlite mixes.d. Glass fibre, crushed rock, blast furnace slag or ceramic-based products (with or without resin binders).e. Intumescent mastics.These may be used in situations appropriate to the particular material. Not all materials will be suitable in every situation.10.28 Guidance on the design, installation and maintenance of measures to contain fires or slow their spread is given in Ensuring Best Practice for Passive Fire Protection in Buildings produced by the Association for Specialist Fire Protection (ASFP).10.29 Further information on generic systems, their suitability for different applications and guidance on test methods is given in the ASFP Red Book.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB3Building Regulations 2010 Approved Document B Volume 2, 2019 edition 89Section 11: Special provisions for car parks11.1 Car parks call for different measures to restrict fire spread within buildings for the following reasons.a. The fire load is well defined.b. The probability of fire spreading from one storey to another in a well ventilated car park is low. Guidance is therefore given for three ventilation scenarios.Open‑sided car parks Natural ventilation11.2 For the purposes of assessing fire resistance, a building, compartment or separated part containing a car park may be regarded as open-sided when it complies with all of the following.a. There are no basement storeys.b. Each storey is naturally ventilated by permanent openings at each car parking level. The aggregate vent area is a minimum of 1/20 of that level’s floor area, at least half of which is provided equally by two opposite walls (1/80 on each side). The remaining free area can be distributed wherever possible.c. Where one element of structure supports, carries or stabilises another, the fire resistance of the supporting element at least matches the minimum period of fire resistance for the other element.d. In mixed use buildings, the fire resistance of any element that supports, carries or stabilises an element in the other part of the building should at least match the minimum period of fire resistance for the other element.e. All materials used in the construction should be class A1 rated, except for the following.i. Any surface finish applied to a floor or roof of the car park (or within any building, compartment or separated part adjoining the structure enclosing it), if the finish meets requirements B2 and B4.ii. Any fire doorset.iii. Any attendant’s kiosk not exceeding 15m2 in area.iv. Any shop mobility facility.Car parks that are not open‑sided11.3 For car parks that do not have the ventilation set out in paragraph 11.2, the required fire resistance is given in Appendix B, Table B4. Ventilation should be either natural or mechanical. See Approved Document F for additional guidance on ventilation of car parks.Natural ventilation11.4 Each storey should be ventilated by permanent openings at each car parking level. The openings can be at ceiling level. The aggregate free vent area should be a minimum of 1/40 of that level’s floor area, at least half of which should be provided equally by two opposite walls (1/160 on each side). The remaining free area can be distributed wherever possible. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION90 Approved Document B Volume 2, 2019 edition Building Regulations 2010B3Mechanical ventilation11.5 If the minimum standard of natural ventilation is not possible, a system of mechanical ventilation should be provided that complies with all of the following.a. The system should be both of the following.i. Independent of any other ventilating system (other than any system that provides day to day ventilation to the car park).ii. Designed to operate at 10 air changes per hour during a fire.b. The system should run in two parts, each of which is:i. capable of extracting 50% of the rates set out in item (a)ii. able to operate alone or with the other partiii. provided with an independent power supply capable of operating if the main supply fails.c. 50% of the outlets should be at high level and 50% at low level.d. The system should use E, I and S ductwork in accordance with BS EN 1366-8.For further information on equipment for removing hot smoke, refer to BS EN 12101-3. An alternative method of providing smoke ventilation from enclosed car parks is given in BS 7346-7.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB4Building Regulations 2010 Approved Document B Volume 2, 2019 edition 91Requirement B4: External fire spreadThese sections deal with the following requirement from Part B of Schedule 1 to the Building Regulations 2010. Section 12 also refers to regulation 7(2) of the Building Regulations 2010. Guidance on regulation 7(1) can be found in Approved Document 7.RequirementRequirementLimits on applicationExternal fire spreadB4. (1) The external walls of the building shall adequately resist the spread of fire over the walls and from one building to another having regard to the height, use and position of the building. (2) The roof of the building shall adequately resist the spread of fire over the roof and from one building to another, having regard to the use and position of the building.RegulationRegulation 7 – Materials and workmanship(1) Building work shall be carried out—(a) with adequate and proper materials which—(i) are appropriate for the circumstances in which they are used,(ii) are adequately mixed or prepared, and(iii) are applied, used or fixed so as adequately to perform the functions for which they are designed; and(b) in a workmanlike manner.(1A) Building work shall be carried out so that relevant metal composite material does not become part of an external wall, or specified attachment, of any building.(2) Subject to paragraph (3), building work shall be carried out so that materials which become part of an external wall, or specified attachment, of a relevant building are of European Classification A2-s1, d0 or A1 (classified in accordance with the reaction to fire classification). ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION92 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4Regulation continued(3) Paragraph (2) does not apply to—(a) cavity trays when used between two leaves of masonry;(b) any part of a roof (other than any part of a roof which falls within paragraph (iv) of regulation 2(6)) if that part is connected to an external wall;(c) door frames and doors;(d) electrical installations;(da) fibre optic cables;(e) insulation and water proofing materials used below ground level or up to 300mm above that level;(f) intumescent and fire stopping materials where the inclusion of the materials is necessary to meet the requirements of Part B of Schedule 1;(g) membranes;(h) seals, gaskets, fixings, sealants and backer rods;(ha) components associated with a solar shading device, excluding components whose primary function is to provide shade or deflect sunlight, such as the awning curtain or slats;(i) thermal break materials where the inclusion of the materials is necessary to meet the thermal bridging requirements of Part L of Schedule 1;(j) window frames and glass; or(k) materials which form the top horizontal floor layer of a balcony which are of European Classification A1fl or A2fl-sl (classified in accordance with the reaction to fire classification) provided that the entire layer has an imperforate substrate under it.(4) In this regulation—(a) a “relevant building” means a building with a storey (not including roof-top plant areas or any storey consisting exclusively of plant rooms) at least 18 metres above ground level and which—(i) contains one or more dwellings;(ii) contains an institution; or(iii) contains a room for residential purposes; and(b) “above ground level” in relation to a storey means above ground level when measured from the lowest ground level adjoining the outside of a building to the top of the floor surface of the storey. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 93B4IntentionResisting fire spread over external wallsThe external envelope of a building should not contribute to undue fire spread from one part of a building to another part. This intention can be met by constructing external walls so that both of the following are satisfied.a. The risk of ignition by an external source to the outside surface of the building and spread of fire over the outside surface is restricted.b. The materials used to construct external walls, and attachments to them, and how they are assembled do not contribute to the rate of fire spread up the outside of the building.The extent to which this is necessary depends on the height and use of the building. Resisting fire spread from one building to anotherThe external envelope of a building should not provide a medium for undue fire spread to adjacent buildings or be readily ignited by fires in adjacent buildings. This intention can be met by constructing external walls so that all of the following are satisfied.a. The risk of ignition by an external source to the outside surface of the building is restricted.b. The amount of thermal radiation that falls on a neighbouring building from window openings and other unprotected areas in the building on fire is not enough to start a fire in the other building.c. Flame spread over the roof and/or fire penetration from external sources through the roof is restricted.The extent to which this is necessary depends on the use of the building and its position in relation to adjacent buildings and therefore the site boundary.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB494 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 12: Resisting fire spread over external wallsIntroduction12.1 The external wall of a building should not provide a medium for fire spread if that is likely to be a risk to health and safety. Combustible materials and cavities in external walls and attachments to them can present such a risk, particularly in tall buildings. The guidance in this section is designed to reduce the risk of fire spread as well as the risk of ignition from flames coming from adjacent buildings.Fire resistance12.2 This section provides guidance on resisting fire spread over external walls; however, it does not deal with fire resistance of external walls. An external wall may need fire resistance to meet the provisions of Section 2 (Design for horizontal escape), Section 3 (Design for vertical escape), Section 7 (Loadbearing elements of structure), Section 13 (Resisting fire spread from one building to another) or Section 17 (Access to buildings for firefighting personnel).Combustibility of external walls12.3 The external walls of buildings other than those described in regulation 7(4) of the Building Regulations should achieve either of the following. a. Follow the provisions given in paragraphs 12.5 to 12.10, which provide guidance on all of the following.i. External surfaces.ii. Materials and products.iii. Cavities and cavity barriers. b. Meet the performance criteria given in BRE report BR 135 for external walls using full-scale test data from BS 8414-1 or BS 8414-2.12.4 In relation to buildings of any height or use, consideration should be given to the choice of materials (including their extent and arrangement) used for the external wall, or attachments to the wall (e.g. balconies, etc.), to reduce the risk of fire spread over the wall.External surfaces12.5 The external surfaces (i.e. outermost external material) of external walls should comply with the provisions in Table 12.1. The provisions in Table 12.1 apply to each wall individually in relation to its proximity to the relevant boundary. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 95B4Table 12.1 Reaction to fire performance of external surface of wallsBuilding typeBuilding heightLess than 1000mm from the relevant boundary1000mm or more from the relevant boundary‘Relevant buildings’ as defined in regulation 7(4) (see paragraph 12.15)Class A2-s1, d0(1) or betterClass A2-s1, d0(1) or betterAll ‘residential’ purpose groups (purpose groups 1 and 2)More than 11m Class A2-s1, d0(2) or betterClass A2-s1, d0(2) or better11m or less Class B-s3, d2(2) or betterNo provisionsAssembly and recreationMore than 18mClass B-s3, d2(2) or betterFrom ground level to 18m: class C-s3, d2(3) or betterFrom 18m in height and above: class B-s3, d2(2) or better18m or lessClass B-s3, d2(2) or betterUp to 10m above ground level: class C-s3, d2(3) or betterUp to 10m above a roof or any part of the building to which the public have access: class C-s3, d2(3) or better(4)From 10m in height and above: no minimum performanceAny other buildingMore than 18mClass B-s3, d2(2) or betterFrom ground level to 18m: class C-s3, d2(3) or betterFrom 18m in height and above: class B-s3, d2(2) or better18m or lessClass B-s3, d2(2) or betterNo provisionsNOTES:In all cases all the following provisions apply. • Regulation 7(1A) prohibits the use of relevant metal composite materials in the external walls, and specified attachments, of all buildings of any height (see paragraphs 12.12 and 12.13). • The advice in paragraph 12.4 should always be followed. In addition to the provisions within this table, buildings with a storey 18m or more above ground level should also meet the provisions of paragraph 12.6. In addition to the provisions within this table, buildings with a storey 11m or more above ground level should also meet the provisions of paragraph 12.7. 1. The restrictions for these buildings apply to all the materials used in the external wall and specified attachments (see paragraphs 12.14 to 12.17 for further guidance).2. Profiled or flat steel sheet at least 0.5 mm thick with an organic coating of no more than 0.2mm thickness is also acceptable.3. Timber cladding at least 9mm thick is also acceptable. 4. 10m is measured from the top surface of the roof.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION96 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4Materials and products12.6 In a building with a storey 18m or more in height (see Diagram D6 in Appendix D) any insulation product, filler material (such as the core materials of metal composite panels, sandwich panels and window spandrel panels but not including gaskets, sealants and similar) etc. used in the construction of an external wall should be class A2-s3, d2 or better (see Appendix B). This restriction does not apply to masonry cavity wall construction which complies with Diagram 9.2 in Section 9. Where regulation 7(2) applies, that regulation prevails over all the provisions in this paragraph. 12.7 In buildings that include a ‘residential’ purpose (purpose groups 1 and 2) with a storey 11m or more in height (see Diagram D6 in Appendix D) any insulation product, filler material (such as the core materials of metal composite panels, sandwich panels and window spandrel panels but not including gaskets, sealants and similar) etc. used in the construction of an external wall should be class A2-s1, d0 or better (see Appendix B). This restriction does not apply to masonry cavity wall construction which complies with Diagram 9.2 in Section 9. Where regulation 7(2) applies, that regulation prevails over all the provisions in this paragraph.12.8 Best practice guidance for green walls (also called living walls) can be found in Fire Performance of Green Roofs and Walls, published by the Department for Communities and Local Government. Where regulation 7(2) applies, that regulation prevails over all the provisions in this paragraph.Cavities and cavity barriers12.9 Cavity barriers should be provided in accordance with Section 9. 12.10 In the case of an external wall construction of a building which, by virtue of paragraph 9.10d (external cladding system with a masonry or concrete inner leaf), is not subject to the provisions of Table 9.1, the surfaces which face into cavities should also meet the provisions of Table 12.1 and provisions in Section 9, but where regulation 7(2) applies, that regulation prevails over the guidance provided in Table 12.1 and Section 9.Balconies 12.11 In buildings that include a ‘residential’ purpose (purpose groups 1 and 2) with a storey 11m or more in height (see Diagram D6 in Appendix D) balconies should meet either of the following conditions.a. Only contain materials achieving class A1 or A2-s1, d0, except for any of the following.i. Cavity trays when used between two leaves of masonry.ii. Intumescent and fire-stopping materials where the inclusion of the materials is necessary to meet the requirements of Part B of Schedule 1 to the Building Regulations 2010.iii. Membranes. iv. Seals, gaskets, fixings, sealants and backer rods. v. Thermal break materials where the inclusion of the materials is necessary to meet the thermal bridging requirements of Part L of Schedule 1 to the Building Regulations 2010. vi. Any material achieving class A1fl or A2fl-s1 when it forms the top horizontal floor layer of a balcony and is provided with an imperforate substrate under it which extends to the full size of the class A1fl or A2fl-s1 material.vii. Electrical installations.viii. Fibre optic cables.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 97B4b. Achieve both of the following conditions. i. Have an imperforate soffit which extends to the full area of the balcony, achieves a minimum REI 30 rating and is constructed of materials achieving class A2-s1, d0 or better. ii. Materials achieving class B-s1, d0 or worse extending beyond the boundary of a single compartment should include a band of material rated class A2-s1, d0 or better, a minimum of 300mm in width centred on that boundary line. Where regulation 7(2) applies, that regulation prevails over all the provisions in this paragraph.Metal composite materials 12.12 Regulation 7(1A) prohibits the use of relevant metal composite materials in the external walls, and specified attachments, of all buildings of any height. 12.13 Relevant metal composite materials are defined (in regulation 2(6)(c)) as any panel or sheet, having a thickness of no more than 10mm which is composed of a number of layers two or more of which are made of metal, alloy or metal compound and one or more of which is a substantial layer made of a material having a gross calorific value of more than 35MJ/kg when tested in accordance with BS EN ISO 1716. A substantial layer is defined as a layer which is at least 1mm thick or has a mass per unit area of at least 1kg/m². Regulation 7(2) and requirement B4Materials 12.14 Regulation 7(1)(a) requires that materials used in building work are appropriate for the circumstances in which they are used. Regulation 7(2) sets requirements in respect of external walls and specified attachments in relevant buildings.NOTE: Further guidance on regulation 7(1) can be found in HM Government’s Manual to the Building Regulations.12.15 Regulation 7(2) applies to any building with a storey at least 18m above ground level (as measured in accordance with Diagram D6 in Appendix D) and which contains one or more dwellings; an institution; or a room for residential purposes. It requires that all materials which become part of an external wall or specified attachment achieve class A2-s1, d0 or class A1 in accordance with BS EN 13501-1, other than those exempted by regulation 7(3).NOTE: The above includes student accommodation, care homes, sheltered housing, hospitals, dormitories in boarding schools, hotels, hostels and boarding houses. See regulation 7(4) for the definition of relevant buildings.NOTE: Transposition to a national class (Table B1) does not apply to the classification in this paragraph. 12.16 External walls and specified attachments are defined in regulation 2(6) and these definitions include any parts of the external wall as well as balconies, solar panels and solar shading.12.17 Regulation 7(3) provides an exemption for certain components found in external walls and specified attachments.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION98 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4Material change of use12.18 Regulations 5(k) and 6(3) provide that, where the use of a building is changed such that the building becomes a building described in regulation 7(4), the construction of the external walls, and specified attachments, must be investigated and, where necessary, work must be carried out to ensure they only contain materials achieving class A2-s1, d0 or class A1, other than those exempted by regulation 7(3).Solar shading devices 12.19 Regulation 7(2) requires that the curtain and or slats of solar shading devices in a relevant building (as defined in regulation 7(4)) achieve class A1 or A2-s1, d0. The curtain of solar shading devices cannot be classified as a membrane in accordance with regulation 7(3). 12.20 Solar shading devices installed up to 4.5m above ground level are not required to meet the requirements of regulation 7(2). Additional considerations12.21 The provisions of regulation 7 apply in addition to requirement B4. Therefore, for buildings described in regulation 7(4), the potential impact of any products incorporated into or onto the external walls and specified attachments should be carefully considered with regard to their number, size, orientation and position. 12.22 Particular attention is drawn to the following points.a. Membranes used as part of the external wall construction above ground level should achieve a minimum of class B-s3, d0. Roofing membranes do not need to achieve a minimum of class A2-s1, d0 when used as part of a roof connecting to an external wall. b. Internal linings should comply with the guidance provided in Section 4. c. Any part of a roof should achieve the minimum performance as detailed in Section 12.d. As per regulation 7(3), window frames and glass (including laminated glass) are exempted from regulation 7(2). Window spandrel panels and infill panels must comply with regulation 7(2).e. Thermal breaks are small elements used as part of the external wall construction to restrict thermal bridging. There is no minimum performance for these materials. However, they should not span two compartments and should be limited in size to the minimum required to restrict the thermal bridging (the principal insulation layer is not to be regarded as a thermal break).f. Regulation 7(2) only applies to specified attachments. Shop front signs and similar attachments are not covered by the requirements of regulation 7(2), although attention is drawn to paragraph 12.22g.g. While regulation 7(2) applies to materials which become part of an external wall or specified attachment, consideration should be given to other attachments to the wall which could impact on the risk of fire spread over the wall.h. Any material achieving class A1fl or A2fl-s1 in accordance with BS EN 13501-1 is exempted when it meets both of the following conditions. i. It forms the top horizontal floor layer of a balcony.ii. It is provided with an imperforate substrate under it which extends to the full size of the class A1fl or A2fl-s1 material. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB4Building Regulations 2010 Approved Document B Volume 2, 2019 edition 99Section 13: Resisting fire spread from one building to anotherIntroduction13.1 The following assumptions enable a reasonable standard of resistance to the spread of fire to be specified.a. The size of a fire depends on the compartmentation within the building. A fire may involve a complete compartment, but will not spread to other compartments.b. The intensity of fire is related to the building use, but can be moderated by a sprinkler system.c. Fires in ‘residential’ and ‘assembly and recreation’ buildings (purposes groups 1, 2 and 5) represent a greater risk to life.d. A building on the far side of the relevant boundary meets both of the following conditions.i. Has a similar elevation to the one in question.ii. Is at the same distance from the common boundary.e. The radiated heat passing through any part of the fire resisting external wall may be discounted.13.2 Where regulation 7(2) applies, that regulation prevails over the provisions within this section.13.3 If a reduced separation distance between buildings, or increased amount of unprotected area, is required, smaller compartments should be considered.Boundaries13.4 The fire resistance of a wall depends on its distance from the relevant boundary (see Diagram 13.1). Separation distances are measured to boundaries to ensure that the location and design of buildings on adjoining sites have no influence on the building under consideration.13.5 The boundary that a wall faces is the relevant boundary (Diagram 13.2). It may be one of the following. a. The site boundary. b. The centre line of a space where further development is unlikely, such as a road, railway, canal or river. c. An assumed notional boundary between two buildings on the same site (Diagram 13.3) where either of the following conditions is met. i. One or both of the buildings are in the ‘residential’ or ‘assembly and recreation’ purpose groups (purpose group 1, 2 or 5). ii. The buildings will be operated/managed by different organisations. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION100 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4See para 13.4Fire resistingfrom both sidesFire resisting frominside: reducedinsulation criterionNo provisionfor fire resistanceWall sufficiently distant fromrelevant boundary to be a100% unprotected areaSee para 13.4Wall on or very close to therelevant boundary: very limitedamounts of unprotected areaWall not on, or not very closeto, but not sufficiently far fromrelevant boundary that it can be awholly unprotected areaRelevant boundaryAmount of unprotectedarea dependent on distancefrom relevant boundaryDiagram 13.1 Principles of space separationONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 101B4See para 13.5This boundary coincideswith and is thereforerelevant to side AThe boundary isparallel to side B2But the relevant boundarymay be the centre line of aroad, railway, canal or riverThis boundary is at less than80 degrees to side C and is thereforerelevant to side CNOTES:This diagram sets out the rulesthat apply in respect of aboundary for it to beconsidered as a relevantboundary.For a boundary to be relevantit should comply with one ofthe following:a. Coincide with the side of the building (A).b. Be parallel to the side of the building (B1 or B2).c. Be at an angle of maximum 80 degrees to the side of the building (C).< 80°This boundaryis parallel toand thereforerelevant toside B1CAB1B2BuildingDiagram 13.2 Relevant boundarySee para 13.5NOTES:The notional boundary should be set in the area between the two buildings using the following rules:1. The notional boundary is assumed to exist in the space between the buildings and is positioned so that one of the buildings would comply with the provisions for space separation having regard to the amount of its unprotected area. In practice, if one of the buildings is existing, the position of the boundary will be set by the space separation factors for that building.2. The siting of the new building, or the second building if both are new, can then be checked to see that it also complies, using the notional boundary as the relevant boundary for the second building. Building ABuilding BNotionalboundarySiteboundaryCompliance with the provisions forspace separation in respect of building ACompliance with the provisions forspace separation in respect of building BSee para 13.5Diagram 13.3 Notional boundaryONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION102 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4Unprotected areas and fire resistance13.6 Parts of an external wall with less fire resistance than the appropriate amount given in Appendix B, Table B4, are called unprotected areas.13.7 Where a fire resisting external wall has an external surface material that is worse than class B-s3, d2 and is more than 1mm thick, that part of the wall should be classified as an unprotected area equating to half its area (Diagram 13.4).External walls on, and within 1000mm of, the relevant boundary13.8 Unprotected areas should meet the conditions in Diagram 13.5 and the rest of the wall should be fire resisting from both sides.External surface materials facing the boundary should be class B-s3, d2 or better.External walls 1000mm or more from the relevant boundary13.9 Unprotected area should not exceed the result given by one of the methods in paragraph 13.17, and the rest of the wall (if any) should be fire resisting but only from the inside of the building. External walls of protected stairways13.10 Exclude external walls of stairways in a protected shaft when assessing unprotected areas (see Diagram 3.3) See para 13.7Area of fire resisting wall with materials more than 1mm thick and with a reaction to fire performance worse than class B-s3, d2 = a3bArea of wall counted as unprotected area = 0.5a3bArea of fire resisting wall with materials having a reaction to fire performance better than class B-s3, d2abLorem ipsumDiagram 13.4 Status of materials achieving class B-s3, d2 or worse as unprotected areaONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 103B4Small unprotected areas13.11 In an otherwise protected wall, small unprotected areas may be ignored where they meet the conditions in Diagram 13.5.See para 13.11The unprotected areaof the external wallof a stairway forminga protected shaftmay be disregardedfor separationdistance purposesRoofs pitched at anangle of less than 70degrees may bedisregarded forseparation distancepurposesaaabbbbbbbaCompartmentfloorCompartmentwallRepresents an unprotected area of notmore than 1m2 which may consist oftwo or more smaller areas within anarea of 1000mm31000mmRepresents an area of notmore than 0.1m2Dimensional restrictions4000mm minimum distance1500mm minimum distanceabRoofDiagram 13.5 Small unprotected areas that may be disregarded in assessing the separation distance from the boundaryLarge uncompartmented buildings13.12 For the purposes of assessing unprotected area, parts of walls of uncompartmented buildings that are more than 30m above mean ground level may be ignored. Canopies13.13 Where both of the following apply, separation distances may be determined from the wall rather than from the edge of the canopy (Diagram 13.6).a. The canopy is attached to the side of a building.b. The edges of the canopy are a minimum of 2m from the relevant boundary.Canopies that fall within class 6 or class 7 of Schedule 2 to the regulations (Exempt Buildings and Work) are exempt from the Building Regulations.13.14 Space separation may be disregarded if a canopy is all of the following.a. Free-standing.b. Above a limited risk or controlled hazard, for example over petrol pumps.c. A minimum of 1000mm from the relevant boundary.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION104 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4See para 13.132m min.CanopyRelevantboundaryBuilding lineDistance torelevant boundarymeasured frombuilding lineNOTE: Projections from the building line, such as a canopy or a loading platform, can be ignored when assessing separation distance. This does not apply where the canopy is enclosed by side walls.See para 13.132m min.RelevantboundaryBuilding lineDistance torelevant boundarymeasured frombuilding lineLoading platformLoading bay arrangementCanopy arrangementDiagram 13.6 The effect of a canopy on separation distanceRoofs13.15 Roofs with a pitch of more than 70 degrees to the horizontal should be assessed in accordance with this section. Vertical parts of a pitched roof, such as dormer windows, should be included, only if the slope of the roof exceeds 70 degrees. It is a matter of judgement whether a continuous run of dormer windows that occupies most of a steeply pitched roof should be treated as a wall rather than a roof.Portal frames13.16 Portal frames are often used in single storey industrial and commercial buildings where there may be no need for fire resistance of the structure (requirement B3). However, where a portal framed building is near a relevant boundary, the external wall near the boundary may need fire resistance to restrict the spread of fire between buildings. It is generally accepted that a portal frame acts as a single structural element because of the moment-resisting connections used, especially at the column/rafter joints. Thus, in cases where the external wall of the building cannot be wholly unprotected, the rafter members of the frame, as well as the column members, may need to be fire protected. The design method for this is set out in SCI Publication P313.NOTE: The recommendations in the SCI publication for designing the foundation to resist overturning do not need to be followed if the building is fitted with a sprinkler system in accordance with Appendix E.NOTE: Normally, portal frames of reinforced concrete can support external walls requiring a similar degree of fire resistance without specific provision at the base to resist overturning.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 105B4NOTE: Existing buildings may have been designed to comply with all of the following guidance, which is also acceptable.a. The column members are fixed rigidly to a base of sufficient size and depth to resist overturning.b. There is brick, block or concrete protection to the columns up to a protected ring beam providing lateral support.c. There is some form of roof venting to give early heat release. (The roof venting could be, for example, PVC rooflights covering some 10% of the floor area and evenly spaced over the floor area.)Methods for calculating acceptable unprotected area13.17 Two simple methods are given for calculating the acceptable amount of unprotected area in an external wall that is a minimum of 1000mm from any point on the relevant boundary. More precise methods are described in BRE report BR 187 and may be used instead. When using BR 187 the following radiation intensity at each unprotected area should be assumed.a. 84kW/m2 if the purpose group of the building is ‘residential’ (purpose groups 1 or 2), ‘office’ (purpose group 3) or ‘assembly and recreation’ (purpose group 5) or if the building is an open-sided multi-storey car park (purpose group 7(b)). b. 168kW/m2 if the purpose group of the building is ‘shop and commercial’ (purpose group 4), ‘industrial’ (purpose group 6) or ‘storage and other non-residential’ (purpose group 7(a)).Method 113.18 This method applies to small buildings intended to be used for ‘residential (other)’ purposes.13.19 The building should not exceed three storeys in height (excluding basements) or 24m in length. Each side of the building should meet the limits stated in Diagram 13.7. Any small unprotected areas falling within the limits shown in Diagram 13.5 can be ignored.See para 13.1924m max.aRelevant boundaryMinimum distance (a)between side of buildingand relevant boundary (m)Maximum total area ofunprotected areas (m2)1234565.612182430No limitSee para 13.19Diagram 13.7 Permitted unprotected areas in small residential buildingsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION106 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4Method 213.20 This method may be used for buildings or compartments intended for any use and for which method 1 is not appropriate.13.21 Except for an open-sided car park in purpose group 7(b) (see paragraph 11.2), the building should not exceed 10m in height. Each side of the building should meet the limits in Table 13.1. Areas falling within the limits in Diagram 13.5 can be ignored.Table 13.1 Permitted unprotected areas in small buildings or compartments Minimum distance between side of building and relevant boundary (m)Maximum total percentage of unprotected area (%)Purpose groupsResidential, office, assembly and recreation(1)Shop and commercial, industrial, storage and other non-residential(2)(3)Not applicable141282.5520510407.5156010208012.525100NOTES:1. Intermediate values may be obtained by interpolation.2. For buildings fitted with an automatic sprinkler system, see paragraph 13.22.3. For open-sided car parks in purpose group 7(b), the distances set out in column (1) may be used instead of those in column (2).4. The total percentage of unprotected area is found by dividing the total unprotected area by the area of a rectangle that encloses all the unprotected areas, and multiplying the result by 100.Sprinkler systems13.22 If a building is fitted throughout with a sprinkler system in accordance with Appendix E, either of the following is permitted.a. The boundary distance can be halved, to a minimum distance of 1m.b. The amount of unprotected area can be doubled.Atrium buildings13.23 If a building contains one or more atria, the recommendations in clause B8 of BS 9999 should be followed.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB4Building Regulations 2010 Approved Document B Volume 2, 2019 edition 107Section 14: Resisting fire spread over roof coveringsIntroduction14.1 ‘Roof covering’ describes one or more layers of material, but not the roof structure as a whole. 14.2 Provisions for the fire properties of roofs are given in other parts of this document.a. Requirement B1 – for roofs that are part of a means of escape. b. Requirement B2 – for the internal surfaces of rooflights as part of internal linings.c. Requirement B3 – for roofs that are used as a floor and for roofs passing over a compartment wall.d. Section 13 – the circumstances in which a roof is subject to the provisions for space separation.Separation distances14.3 Separation distance is the minimum distance from the roof, or part of the roof, to the relevant boundary (paragraph 13.5). Table 14.1 sets out separation distances by the type of roof covering and the size and use of the building.In addition, roof covering products (and/or materials) defined in Commission Decision 2000/553/EC of 6 September 2000, implementing Council Directive 89/106/EEC, can be considered to fulfil all of the requirements for the performance characteristic ‘external fire performance’ without the need for testing, provided that any national provisions on the design and execution of works are fulfilled, and can be used without restriction.14.4 The performance of rooflights is specified in a similar way to the performance of roof coverings. Plastic rooflights may also be used.Plastic rooflights14.5 Table 14.2 and Diagram 14.1 set the limitations for using plastic rooflights whose lower surface has a minimum rating of class D-s3, d2.14.6 Table 14.3 sets the limitations for using thermoplastic materials with a TP(a) rigid or TP(b) (see also Diagram 14.1) classification. The method of classifying thermoplastic materials is given in Appendix B.14.7 Other than for the purposes of Diagram 8.2, polycarbonate or uPVC rooflights achieving a minimum rating of class C-s3, d2 can be regarded as having a BROOF(t4) classification.Unwired glass in rooflights14.8 When used in rooflights, unwired glass a minimum of 4mm thick can be regarded as having a BROOF(t4) classification.Thatch and wood shingles14.9 If the performance of thatch or wood shingles cannot be established, they should be regarded as having an EROOF(t4) classification in Table 14.1.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION108 Approved Document B Volume 2, 2019 edition Building Regulations 2010B4See paras 14.5 and 14.6Rooflight*max. area 5m2Rooflight*max. area 5m23m† minimumbetween anytwo rooflightsin any direction* Or group of rooflights amounting to no more than 5m2† Class D-s3, d2 rooflights to rooms in industrial and other non-residential purpose groups may be spaced 1800mm apart provided the rooflights are evenly distributed and do not exceed 20% of the area of the roomNOTES:1. There are restrictions on the use of plastic rooflights in the guidance to requirement B2 in Section 6.2. Surrounding roof covering to be class B-s3, d2 for at least 3m distance.3. Where Diagram 8.2a or 8.2b applies, rooflights should be at least 1500mm from the compartment wall.See paras 14.5 and 14.6Diagram 14.1 Limitations on spacing and size of plastic rooflights that have a class D-s3, d2 or TP(b) lower surfaceTable 14.1 Limitations on roof coverings Designation(1) of covering of roof or part of roofDistance from any point on relevant boundaryLess than 6mAt least 6mAt least 12mAt least 20mBROOF(t4)llllCROOF(t4)llllDROOF(t4)l(1)(2)l(2)(3)(1)l(2)lEROOF(t4)l(1)(2)l(2)(3)(1)l(2)(1)l(2)FROOF(t4)lll(1)(2)l(2)(3)l Acceptable. l Not acceptable.NOTES:Separation distances do not apply to enclosed/covered walkways. However, see Diagram 8.2 if the roof passes over the top of a compartment wall. Polycarbonate and uPVC rooflights that achieve a class C-s3, d2 rating by test may be regarded as having a BROOF(t4) classification.1. The designation of external roof surfaces is explained in Appendix B2. Not acceptable on any of the following buildings. a. Industrial, storage or other non-residential purpose group (purpose groups 6 and 7) buildings of any size. b. Any other buildings with a cubic capacity of more than 1500m3.3. Acceptable on buildings not listed in (2) if both of the following apply. a. Part of the roof has a maximum area of 3m2 and is a minimum of 1500mm from any similar part. b. The roof between the parts is covered with a material rated class A2-s3, d2 or better.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 109B4Table 14.2 Class D-s3, d2 plastic rooflights: limitations on use and boundary distance Minimum classification on lower surface(1)Space that rooflight can serveMinimum distance from any point on relevant boundary to rooflight with an external designation(2) of:EROOF(t4) or DROOF(t4)FROOF(t4) Class D-s3, d2 a. Balcony, verandah, carport, covered way or loading bay that has at least one longer side wholly or permanently open6m20mb. Detached swimming poolc. Conservatory, garage or outbuilding, with a maximum floor area of 40m2d. Circulation space(3) (except a protected stairway)6m(4)20m(4)e. Room(3) NOTES:None of the above designations are suitable for protected stairways.Polycarbonate and uPVC rooflights that achieve a class C-s3, d2 rating by test (see paragraph 14.7) may be regarded as having a BROOF(t4) classification. Where Diagram 8.2a or 8.2b applies, rooflights should be a minimum of 1500m from the compartment wall.If double-skinned or laminate products have upper and lower surfaces of different materials, the greater distance applies.1. See also the guidance to requirement B2 in Section 6.2. The designation of external roof surfaces is explained in Appendix B.3. Single-skinned rooflight only, in the case of non-thermoplastic material.4. The rooflight should also meet the provisions of Diagram 14.1.Table 14.3 TP(a) and TP(b) thermoplastic rooflights: limitations on use and boundary distance Minimum classification on lower surface(1)Space that rooflight can serveMinimum distance from any point on relevant boundary to rooflight with an external surface classification(1) of:TP(a)TP(b)1. TP(a) rigidAny space except a protected stairway6m(2)Not applicable2. TP(b)a. Balcony, verandah, carport, covered way or loading bay, which has at least one longer side wholly or permanently openNot applicable6mb. Detached swimming poolc. Conservatory, garage or outbuilding, with a maximum floor area of 40m2d. Circulation space(3) (except a protected stairway)Not applicable6m(4)e. Room(3)NOTES:None of the above designations are suitable for protected stairways.Polycarbonate and uPVC rooflights that achieve a class C-s3, d2 rating by test may be regarded as having a BROOF(t4) designation.Where Diagram 8.2a or 8.2b applies, rooflights should be at least 1500mm from the compartment wall.If double-skinned or laminate products have upper and lower surfaces of different materials, the greater distance applies.1. See also the guidance to requirement B2 in Section 6.2. No limit in the case of any space described in 2(a), (b) and (c). 3. Single-skinned rooflight only, in the case of non-thermoplastic material.4. The rooflight should also meet the provisions of Diagram 14.1.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB5110 Approved Document B Volume 2, 2019 edition Building Regulations 2010Requirement B5: Access and facilities for the fire serviceThese sections deal with the following requirement from Part B of Schedule 1 to the Building Regulations 2010.RequirementRequirementLimits on applicationAccess and facilities for the fire serviceB5. (1) The building shall be designed and constructed so as to provide reasonable facilities to assist fire fighters in the protection of life.(2) Reasonable provision shall be made within the site of the building to enable fire appliances to gain access to the building.IntentionProvisions covering access and facilities for the fire service are to safeguard the health and safety of people in and around the building. Their extent depends on the size and use of the building. Most firefighting is carried out within the building. In the Secretary of State’s view, requirement B5 is met by achieving all of the following.a. External access enabling fire appliances to be used near the building.b. Access into and within the building for firefighting personnel to both:i. search for and rescue peopleii. fight fire.c. Provision for internal fire facilities for firefighters to complete their tasks.d. Ventilation of heat and smoke from a fire in a basement.If an alternative approach is taken to providing the means of escape, outside the scope of this approved document, additional provisions for firefighting access may be required. Where deviating from the general guidance, it is advisable to seek advice from the fire and rescue service as early as possible (even if there is no statutory duty to consult).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB5Building Regulations 2010 Approved Document B Volume 2, 2019 edition 111Section 15: Vehicle accessBuildings not fitted with fire mains15.1 For small buildings (up to 2000m2, with a top storey that is a maximum of 11m above ground level), vehicle access for a pump appliance should be provided to whichever is the less onerous of the following. a. 15% of the perimeter.b. Within 45m of every point of the footprint of the building (see Diagram 15.1).15.2 For all other buildings, provide vehicle access in accordance with Table 15.1.15.3 Every elevation to which vehicle access is provided should have a door, a minimum of 750mm wide, to give access into the building. The maximum distance between doors, or between a door and the end of the elevation, is 60m (e.g. a 150m elevation would need a minimum of two doors).Table 15.1 Fire and rescue service vehicle access to buildings not fitted with fire mainsTotal floor area(1) of building (m²)Height of floor of top storey above ground (m)(2)Provide vehicle access to:Type of applianceUp to 2000Up to 11 Over 11See paragraph 15.1 15% of perimeter Pump High reach2000–8000Up to 11 Over 1115% of perimeter 50% of perimeter Pump High reach8000–16,000Up to 11 Over 1150% of perimeter 50% of perimeter Pump High reach16,000–24,000Up to 11 Over 1175% of perimeter 75% of perimeter Pump High reachOver 24,000Up to 11 Over 11100% of perimeter 100% of perimeter Pump High reachNOTES:1. The sum of the area of all storeys in the building (excluding basements).2. For storage buildings (purpose group 7(a)), measure height to mean roof level (see Appendix D).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION112 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5See para 15.1ABCDEFGHIJKLMNPlan of building AFGL where AL and FG are walls in commonwith other buildings.The footprint of the building is the maximum aggregate planperimeter found by the vertical projection of any overhangingstorey onto a ground storey (i.e. ABCDEFGHMNKL).The perimeter of the building for the purposes of Table 15.1 is the sum of the lengths of the two external walls, taking account of the footprint, i.e. (A to B to C to D to E to F) + (G to H to M to N to K to L).If the dimensions of the building are such that Table 15.1requires vehicle access, the green shaded area illustratesone possible example of 15% of the perimeter. Note: There should be a door into the building in this length (see paragraph 15.3).If the building does not have walls in common with otherbuildings, the lengths AL and FG would be included in the perimeter.See para 15.1Diagram 15.1 Example of building footprint and perimeterONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 113B5Buildings fitted with fire mains15.4 For buildings fitted with dry fire mains, both of the following apply. a. Access should be provided for a pumping appliance to within 18m of each fire main inlet connection point. Inlets should be on the face of the building.b. The fire main inlet connection point should be visible from the parking position of the appliance, and satisfy paragraph 16.10. 15.5 For buildings fitted with wet fire mains, access for a pumping appliance should comply with both of the following. a. Within 18m, and within sight of, an entrance giving access to the fire main.b. Within sight of the inlet to replenish the suction tank for the fire main in an emergency.15.6 Where fire mains are provided in buildings for which Sections 16 and 17 make no provision, vehicle access may be as described in paragraphs 15.4 and 15.5, rather than Table 15.1.Design of access routes and hardstandings15.7 Access routes and hardstandings should comply with the guidance in Table 15.2. Requirements can only apply to the site of the works.It may not be reasonable to upgrade the route across a site to a small building. The building control body, in consultation with the fire and rescue service, should consider options from doing no work to upgrading certain features, such as sharp bends.15.8 Where access to an elevation is provided in accordance with Table 15.1, the following requirements should be met, depending on the building height.a. Buildings up to 11m, excluding small buildings (paragraph 15.1): pump appliance access should be provided adjacent to the building for the specified percentage of the total perimeter.b. Buildings over 11m: access routes should comply with the guidance in Diagram 15.2.15.9 Where access is provided for high reach appliances in accordance with Table 15.1, overhead obstructions (such as cables and branches) should be avoided in the zone shown in Diagram 15.2.15.10 Dead-end access routes longer than 20m require turning facilities, as in Diagram 15.3. Turning facilities should comply with the guidance in Table 15.2.Table 15.2 Typical fire and rescue service vehicle access route specificationAppliance typeMinimum width of road between kerbs (m)Minimum width of gateways (m)Minimum turning circle between kerbs (m)Minimum turning circle between walls (m)Minimum clearance height (m)Minimum carrying capacity (tonnes)Pump3.73.116.819.23.712.5High reach3.73.126.029.04.017.0NOTES:1. Fire appliances are not standardised. The building control body may, in consultation with the local fire and rescue service, use other dimensions.2. The roadbase can be designed to 12.5 tonne capacity. Structures such as bridges should have the full 17-tonne capacity. The weight of high reach appliances is distributed over a number of axles, so infrequent use of a route designed to accommodate 12.5 tonnes should not cause damage.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION114 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5See paras 15.8 and 15.9Hardstanding or access roadObstructionOverhead obstructions to be avoided in this zoneFace of building at ground level or vertical planeof projecting upper storey2. Fire appliances are not standardised. Some fire services haveappliances with a greater weight or different size.In consultation with the fire and rescue service, the building control body should adopt the relevant dimensions and ground loading capacity.a. Maximum distance of near edge of hardstanding from buildingb. Minimum width of hardstandingc. Minimum distance of further edge of hardstanding from buildingd. Minimum width of unobstructed space (for swing of appliance platform)4.95.010.0N/A2.05.57.52.2Turntableladderdimension (m)Hydraulicplatformdimension (m)Type of appliancecdabSee paras 15.18 and 15.19NOTES:1. Hardstanding for high reach appliances should be as level as possible and should have a maximum gradient of 1 in 12.Diagram 15.2 Relationship between building and hardstanding/access roads for high reach fire appliancesONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 115B5See para 15.10Fire and rescue service vehicles should not have to reverse more than 20m from the end of an access road.20m max.Turning circle, hammerheador other point at whichvehicle can turnExitSee para 15.10BuildingDiagram 15.3 Turning facilitiesONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB5116 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 16: Fire mains and hydrantsIntroduction16.1 Fire mains are installed for the fire and rescue service to connect hoses for water. They may be either of the following.a. The ‘dry’ type, which are both of the following.i. Normally kept empty.ii. Supplied through a hose from a fire and rescue service pumping appliance.b. The ‘wet’ type, which are both of the following.i. Kept full of water.ii. Supplied by pumps from tanks in the building. There should be a facility to replenish a wet system from a pumping appliance in an emergency.Provision of fire mains16.2 Buildings with firefighting shafts should have fire mains in both of the following.a. The firefighting shafts.b. Where necessary, in protected escape stairs. The criteria for providing firefighting shafts and fire mains are given in Section 17.16.3 Buildings without firefighting shafts should be provided with fire mains where fire service vehicle access is not provided in accordance with Table 15.1. In these cases, outlets from fire mains should be located as described in paragraph 16.4, with a maximum hose distance of 45m from the fire main outlet to the furthest point, measured on a route suitable for laying a hose. Stairs do not need to be designed as firefighting shafts. Design and construction of fire mains16.4 If a firefighting shaft is provided, outlets from fire mains should be within the protected stairway or protected lobby (see Diagram 17.1).16.5 Guidance on the design and construction of fire mains is given in BS 9990.16.6 Buildings with a storey more than 50m above fire service vehicle access level should be provided with wet fire mains. In all other buildings where fire mains are provided, either wet or dry fire mains are suitable.16.7 Fire service vehicle access to fire mains should be provided as described in paragraphs 15.4 and 15.5.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 117B5Provision of private hydrants16.8 A building requires additional fire hydrants if both of the following apply.a. It has a compartment with an area more than 280m2.b. It is being erected more than 100m from an existing fire hydrant.16.9 If additional hydrants are required, these should be provided in accordance with the following.a. For buildings provided with fire mains – within 90m of dry fire main inlets.b. For buildings not provided with fire mains – hydrants should be both of the following.i. Within 90m of an entrance to the building.ii. A maximum of 90m apart.16.10 Each fire hydrant should be clearly indicated by a plate, fixed nearby in a conspicuous position, in accordance with BS 3251.16.11 Guidance on aspects of provision and siting of private fire hydrants is given in BS 9990.Alternative supply of water16.12 An alternative source of water supply should be provided where any of the following apply.a. No piped water supply is available.b. Pressure and flow in the water main are insufficient.c. An alternative source of supply is proposed.16.13 The alternative source of water supply should be one of the following, subject to consultation with the local fire and rescue service.a. A charged static water tank with a minimum capacity of 45,000 litres.b. A spring, river, canal or pond that is capable of fulfilling both of the following conditions.i. Providing or storing a minimum of 45,000 litres of water at all times.ii. Providing access, space and a hardstanding for a pumping appliance.c. Any other water supply that the local fire and rescue service considers appropriate.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONB5118 Approved Document B Volume 2, 2019 edition Building Regulations 2010Section 17: Access to buildings for firefighting personnelIntroduction17.1 Facilities for fire and rescue, such as firefighting lifts, firefighting stairs and firefighting lobbies, are combined in protected firefighting shafts (Diagram 17.1). Section 8 gives guidance on the design and construction of protected shafts.See para 17.1Any buildingFirefightingstairsFire main outletFirefightinglobbyFirefightinglift inlift shaftMinimum fire resistance REI 120 from accommodation side andREI 60 from inside the shaft with E 60 Sa fire doorsMinimum fire resistance REI 60 from both sides with E 30 Sa fire doorsNOTES:1. Outlets from a fire main should be located in the firefightinglobby.2. A firefighting lift is required if the building has a floor morethan 18m above, or more than 10m below, fire service vehicleaccess level.3. This diagram is only to illustrate the basic components and isnot meant to represent the only acceptable layout. The firefighting shaft should be constructed generally in accordance with Section 6 of BS 9999.4. For the minimum fire resistance of lift doors see Table C1.Diagram 17.1 Components of a firefighting shaftONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 119B5Provision of firefighting shafts17.2 A building with a storey more than 18m above the fire and rescue service vehicle access level should have one or more firefighting shafts containing a firefighting lift. The number and location of firefighting shafts should comply with paragraphs 17.4 to 17.7. Firefighting shafts are not required to serve a basement that is not large or deep enough to need one (see paragraph 17.3 and Diagram 17.2).17.3 A building with basement storeys should have firefighting shafts in accordance with the following.a. There is a basement more than 10m below the fire and rescue service vehicle access level. The firefighting shafts should contain firefighting lifts.b. There are two or more basement storeys, each with a minimum area of 900m2. The firefighting shafts do not need to include firefighting lifts.The building’s height and size determine whether firefighting shafts also serve upper storeys.17.4 Firefighting shafts should serve all storeys through which they pass.17.5 A minimum of two firefighting shafts should be provided to buildings with a storey that has both of the following.a. A floor area of 900m2 or more.b. A floor level 18m or more above the fire and rescue service vehicle access level.17.6 At least two firefighting shafts, which do not need to include firefighting lifts, should be provided if buildings meet all of the following.a. They are in the ‘shop and commercial’, ‘assembly and recreation’ or ‘industrial’ purpose group (purpose group 4, 5 or 6).b. They have a storey area of 900m2 or more. c. They have a storey height of 7.5m or more above fire and rescue service vehicle access level.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION120 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5See para 17.2> 18m> 10m> 7.5mTwo or morebasement storeyseach exceeding900m²Buildings in which firefighting shafts should be provided,showing which storeys need to be serveda.Any buildingThe upper storeysin any buildingwith a storey morethan 18m abovefire service vehicleaccess levelb.Any buildingThe basementstoreys in anybuilding with abasement morethan 10m belowfire service vehicleaccess levelc.‘Shop andcommercial’,‘assembly andrecreation’ and‘industrial’buildings (purposegroups 4, 5 and 6)The upper storeys inpurpose groups 4, 5 and 6buildings with a storey of900m2 or more which ismore than 7.5m above fireservice vehicle access level d.Any buildingThe basementstoreys in anybuilding with twoor morebasements eachexceeding 900m²FireservicevehicleaccesslevelExtent offirefightingliftExtent offirefightingstairNOTES:1. Height excludes any top storey(s) consisting exclusively of plant rooms.2. Firefighting shafts should serve all floors through which they pass.Diagram 17.2 Provision of firefighting shaftsLocation of firefighting shafts17.7 Firefighting shafts and protected stairways should be positioned such that every part of each storey more than 18m above the fire and rescue service vehicle access level complies with the maximum distances given in paragraph 17.8. Distances should be measured from the fire main outlet on a route suitable for laying a hose. NOTE: If the internal layout is not known, the distance should be measured at two-thirds of the direct distance.17.8 In any building, the hose laying distance should meet all of the following conditions. a. A maximum of 60m from the fire main outlet in a firefighting shaft (see Diagram 17.3).b. Additionally, where sprinklers have not been provided in accordance with Appendix E, the hose laying distance should be a maximum of 45m from a fire main outlet in a protected shaft (although this does not imply that the protected shaft needs to be designed as a firefighting shaft (see Diagram 17.3).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 121B5See para 17.8Without sprinklersWith sprinklersF60ma.FFb.F60m45mc.FH45md.FFHHe.NOTES:1.2. Hose laying distance should be measured from the fire main outlet along the route suitable for laying hose. If this route is not known, the distance should be taken at two-thirds of the direct distance. The fire main outlet should be located according to paragraph 16.4.FHFloor plan within 60m hose laying distance of fire main outletFloor plan within 45m hose laying distance of fire main outletHose reachFirefighting shaftAdditional hose coverage requiredFire main outlet in a protected shaftDiagram 17.3 Location of firefighting shafts: hose laying distancesONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION122 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5Design and construction of firefighting shafts17.9 Every firefighting stair and firefighting lift should be approached from the accommodation through a firefighting lobby. Both the stair and lobby of the firefighting shaft should be provided with a means of venting smoke and heat (see clause 27.1 of BS 9999).Only services associated with the firefighting shaft, such as ventilation systems and lighting for the firefighting shaft, should pass through or be contained within the firefighting shaft.17.10 All firefighting shafts should have fire mains with outlet connections and valves at every storey.17.11 A firefighting lift installation includes all of the following.a. Lift car.b. Lift well.c. Lift machinery space.d. Lift control system.e. Lift communications system. The lift shaft should be constructed in accordance with Section 6 of BS 9999. Firefighting lift installations should conform to BS EN 81-72 and BS EN 81-20.Rolling shutters in compartment walls17.12 The fire and rescue service should be able to manually open and close rolling shutters without the use of a ladder.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 123B5Section 18: Venting of heat and smoke from basementsProvision of smoke outlets18.1 Heat and smoke from basement fires vented via stairs can inhibit access for firefighting personnel. This may be reduced by providing smoke outlets, or smoke vents, which allow heat and smoke to escape from the basement levels to the open air. They can also be used by the fire and rescue service to let cooler air into the basements (Diagram 18.1). 18.2 Each basement space should have one or more smoke outlets.Where this is not practicable (for example, the plan area is deep and the amount of external wall is restricted by adjoining buildings), the perimeter basement spaces may be vented, with other spaces vented indirectly by opening connecting doors. This does not apply for places of special fire hazard (see paragraph 18.7). If a basement is compartmented, each compartment should have one or more smoke outlets, rather than indirect venting.A basement storey or compartment containing rooms with doors or windows does not need smoke outlets.18.3 Smoke outlets connecting directly to the open air should be provided from every basement storey, except for any basement storey that has both of the following.a. A maximum floor area of 200m2.b. A floor a maximum of 3m below the adjacent ground level.18.4 Strong rooms do not need to be provided with smoke outlets.Natural smoke outlets18.5 Smoke outlets should be both of the following.a. Sited at high level in either the ceiling or wall of the space they serve.b. Evenly distributed around the perimeter, to discharge to the open air.18.6 The combined clear cross-sectional area of all smoke outlets should be a minimum of 1/40 of the area of the floor of the storey they serve.18.7 Separate outlets should be provided from places of special fire hazard.18.8 If the smoke outlet terminates at a point that is not readily accessible, it should be kept unobstructed and covered only with a class A1 grille or louvre.18.9 If the smoke outlet terminates in a readily accessible position, it may be covered by a panel, stallboard or pavement light that can be broken out or opened. The position of covered smoke outlets should be suitably indicated.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION124 Approved Document B Volume 2, 2019 edition Building Regulations 2010B518.10 Outlets should not be placed where they prevent the use of escape routes from the building.Mechanical smoke extract18.11 If basement storeys are fitted with a sprinkler system in accordance with Appendix E, a mechanical smoke extraction system may be provided as an alternative to natural venting. Sprinklers do not need to be installed on the other storeys unless needed for other reasons.Car parks are not normally expected to be fitted with sprinklers (see Section 11 for guidance on car parks).18.12 The air extraction system should comply with all of the following.a. It should give at least 10 air changes per hour.b. It should be capable of handling gas temperatures of 300°C for not less than one hour.c. It should do either of the following.i. Be activated automatically if the sprinkler system activates.ii. Be activated by an automatic fire detection system that conforms to BS 5839-1 (minimum L3 standard). Further information on equipment for removing hot smoke is given in BS EN 12101-3.See paras 18.1 and 18.13ExternalwallGround floorGround floorStallboard outletwith grillor removablecoverBasement outletwith break-out oropenable coverBasementBasementExternalwallFire resisting construction of floorsee Section 8Fire resisting construction achievingthe same rating as the floor of theground storeyDiagram 18.1 Fire resisting construction for smoke outlet shaftsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 125B5Construction of outlet ducts or shafts18.13 Outlet ducts or shafts, including any bulkheads over them (see Diagram 18.1), should be enclosed in construction of class A1 rating and fire resistance at least equal to that of the element through which they pass. 18.14 Natural smoke outlet shafts should be separated from each other using construction of class A1 rating and fire resistance at least equal to that of the storeys they serve, where the shafts are either of the following.a. From different compartments of the same basement storey.b. From different basement storeys.Basement car parks18.15 The provisions for ventilation of basement car parks in Section 11 satisfy the requirements for venting smoke from any basement used as a car park.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION126 Approved Document B Volume 2, 2019 edition Building Regulations 2010R38Regulation 38: Fire safety informationThis section deals with the following regulation of the Building Regulations 2010.Fire safety information38. (1) This regulation applies where building work— (a) consists of or includes the erection or extension of a relevant building; or (b) is carried out in connection with a relevant change of use of a building, and Part B of Schedule 1 imposes a requirement in relation to the work. (2) The person carrying out the work shall give fire safety information to the responsible person not later than the date of completion of the work, or the date of occupation of the building or extension, whichever is the earlier. (3) In this regulation— (a) “fire safety information” means information relating to the design and construction of the building or extension, and the services, fittings and equipment provided in or in connection with the building or extension which will assist the responsible person to operate and maintain the building or extension with reasonable safety; (b) a “relevant building” is a building to which the Regulatory Reform (Fire Safety) Order 2005 applies, or will apply after the completion of building work; (c) a “relevant change of use” is a material change of use where, after the change of use takes place, the Regulatory Reform (Fire Safety) Order 2005 will apply, or continue to apply, to the building; and (d) “responsible person” has the meaning given by article 3 of the Regulatory Reform (Fire Safety) Order 2005.IntentionThe aim of this regulation is to ensure that the person responsible for the building has sufficient information relating to fire safety to enable them to manage the building effectively. The aim of regulation 38 will be achieved when the person responsible for the building has all the information to enable them to do all of the following. a. Understand and implement the fire safety strategy of the building.b. Maintain any fire safety system provided in the building. c. Carry out an effective fire risk assessment of the building. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 127R38Section 19: Fire safety information19.1 For building work involving the erection or extension of a relevant building (i.e. a building to which the Regulatory Reform (Fire Safety) Order 2005 applies or will apply), or the relevant change of use of a building, fire safety information should be given to the responsible person at one of the following times.a. When the project is complete.b. When the building or extension is first occupied. 19.2 This section is a guide to the information that should be provided. Guidance is in terms of essential information and additional information for complex buildings; however, the level of detail required should be considered on a case-by-case basis.Essential information19.3 Basic information on the location of fire protection measures may be sufficient. An as-built plan of the building should be provided showing all of the following.a. Escape routes – this should include exit capacity (i.e. the maximum allowable number of people for each storey and for the building).b. Location of fire-separating elements (including cavity barriers in walk-in spaces).c. Fire doorsets, fire doorsets fitted with a self-closing device and other doors equipped with relevant hardware.d. Locations of fire and/or smoke detector heads, alarm call points, detection/alarm control boxes, alarm sounders, fire safety signage, emergency lighting, fire extinguishers, dry or wet fire mains and other firefighting equipment, and hydrants outside the building.e. Any sprinkler systems, including isolating valves and control equipment.f. Any smoke control systems, or ventilation systems with a smoke control function, including mode of operation and control systems.g. Any high risk areas (e.g. heating machinery).19.4 Details should be provided of all of the following.a. Specifications of any fire safety equipment provided, including routine maintenance schedules.b. Any assumptions regarding the management of the building in the design of the fire safety arrangements.c. Any provision enabling the evacuation of disabled people, which can be used when designing suitable personal emergency evacuation plans.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION128 Approved Document B Volume 2, 2019 edition Building Regulations 2010R38Additional information for complex buildings19.5 A detailed record should be provided of both of the following.a. The fire safety strategy.b. Procedures for operating and maintaining any fire protection measures. This should include an outline cause and effect matrix/strategy for the building. Further guidance is available in clause 9 and Annex H of BS 9999.19.6 The records should include details of all of the following.a. The fire safety strategy, including all assumptions in the design of the fire safety systems (such as fire load). Any risk assessments or risk analysis.b. All assumptions in the design of the fire safety arrangements for the management of the building.c. All of the following.i. Escape routes (including occupant load and capacity of escape routes).ii. Any provision to enable the evacuation of disabled people.iii. Escape strategy (e.g. simultaneous or phased).iv. Muster points.d. All passive fire safety measures, including all of the following.i. Compartmentation (i.e. location of fire-separating elements).ii. Cavity barriers.iii. Fire doorsets, including fire doorsets fitted with a self-closing device and other doors equipped with relevant hardware (e.g. electronic security locks).iv. Duct dampers.v. Fire shutters.e. All of the following.i. Fire detector heads.ii. Smoke detector heads.iii. Alarm call points.iv. Detection/alarm control boxes.v. Alarm sounders.vi. Emergency communications systemsvii. CCTV.viii. Fire safety signage.ix. Emergency lighting.x. Fire extinguishers.xi. Dry or wet fire mains and other firefighting equipment.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 129R38xii. Other interior facilities for the fire and rescue service.xiii. Emergency control rooms.xiv. Location of hydrants outside the building.xv. Other exterior facilities for the fire and rescue service.f. All active fire safety measures, including both of the following.i. Sprinkler system(s) design, including isolating valves and control equipment.ii. Smoke control system(s) (or heating, ventilating and air conditioning system with a smoke control function) design, including mode of operation and control systems.g. Any high-risk areas (e.g. heating machinery) and particular hazards.h. Plans of the building as built, showing the locations of the above.i. Both of the following.i. Specifications of any fire safety equipment provided, including all of the following.• Operational details.• Operators’ manuals.• Software.• System zoning.• Routine inspection, testing and maintenance schedules.ii. Records of any acceptance or commissioning tests.j. Any other details appropriate for the specific building.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION130 Approved Document B Volume 2, 2019 edition Building Regulations 2010AAAppendix A: Key termsNOTE: Except for the items marked * (which are from the Building Regulations 2010), these definitions apply only to Approved Document B.NOTE: The terms defined below are key terms used in this document only. Refer to BS 4422 for further guidance on the definitions of common terms used in the fire safety industry which are not listed below.Access room A room that the only escape route from an inner room passes through.Alternative escape routes Escape routes that are sufficiently separated by direction and space or by fire resisting construction to ensure that one is still available if the other is affected by fire.NOTE: A second stair, balcony or flat roof which enables a person to reach a place free from danger from fire is considered an alternative escape route for the purposes of a dwellinghouse.Alternative exit One of two or more exits, each of which is separate from the other.Appliance ventilation duct A duct to deliver combustion air to a gas appliance.Atrium (plural atria) A continuous space that passes through one or more structural floors within a building, not necessarily vertically.NOTE: Enclosed lift wells, enclosed escalator wells, building services ducts and stairs are not classified as atria.Automatic release mechanism A device that normally holds a door open, but closes it automatically if any one of the following occurs.• Smoke is detected by an automatic device of a suitable nature and quality in a suitable location.• A hand-operated switch, fitted in a suitable position, is operated.• The electricity supply to the device, apparatus or switch fails.• The fire alarm system, if any, is operated.Basement storey A storey with a floor that, at some point, is more than 1200mm below the highest level of ground beside the outside walls. (However, see Appendix B, paragraph B26c, for situations where the storey is considered to be a basement only because of a sloping site.)Boundary The boundary of the land that belongs to a building, or, where the land abuts a road, railway, canal or river, the centre line of that road, railway, canal or river.*Building Any permanent or temporary building but not any other kind of structure or erection. A reference to a building includes a reference to part of a building.Building control body A term that includes both local authority building control and approved inspectors.Cavity A space enclosed by elements of a building (including a suspended ceiling) or contained within an element, but that is not a room, cupboard, circulation space, protected shaft, or space within a flue, chute, duct, pipe or conduit.Cavity barrier A construction within a cavity, other than a smoke curtain, to perform either of the following functions.• Close a cavity to stop smoke or flame entering.• Restrict the movement of smoke or flame within a cavity.Ceiling Part of a building that encloses a room, protected shaft or circulation space and is exposed overhead. NOTE: The soffit of a rooflight, but not the frame, is included as part of the surface of the ceiling. An upstand below a rooflight is considered as a wall.Circulation space A space (including a protected stairway) mainly used as a means of access between a room and an exit from the building or compartment.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 131AAACommon balcony A walkway, open to the air on one or more sides, that forms part of the escape route from more than one flat.Common stair An escape stair that serves more than one flat.Compartment (fire) A building or part of a building, comprising one or more rooms, spaces or storeys, that is constructed to prevent the spread of fire to or from another part of the same building or an adjoining building. NOTE: A roof space above the top storey of a compartment is included in that compartment. (See also ‘Separated part’.)Compartment wall or floor A fire resisting wall or floor to separate one fire compartment from another. NOTE: Provisions relating to construction are given in Section 8.Corridor access A design of a building containing flats, in which each flat is approached via a common horizontal internal access or circulation space, which may include a common entrance hall.Curtain Part of a solar shading device which is set in motion by the operating system and fulfils the purpose of a blind, awning or shutter. Dead end An area from which escape is possible in one direction only.Direct distance The shortest distance from any point within the floor area to the nearest storey exit, measured within the external enclosures of the building, and ignoring walls, partitions and fittings other than the enclosing walls and partitions to protected stairways.*Dwelling Includes a dwellinghouse and a flat. NOTE: A dwelling is a unit where one or more people live (whether or not as a sole or main residence) in either of the following situations.• A single person or people living together as a family.• A maximum of six people living together as a single household, including where care is provided for residents.*Dwellinghouse Does not include a flat or a building containing a flat. Element of structure Any of the following.• A member that forms part of the structural frame of a building, or any other beam or column.• A loadbearing wall or loadbearing part of a wall.• A floor.• A gallery (but not a loading gallery, fly gallery, stage grid, lighting bridge, or any gallery provided for similar purposes or for maintenance and repair).• An external wall.• A compartment wall (including a wall that is common to two or more buildings). NOTE: However, see the guidance to requirement B3, paragraph 7.3, for a list of structures that are not considered to be elements of structure.Emergency lighting Lighting for use when the power supply to the normal lighting fails.Escape lighting The part of the emergency lighting that is provided to ensure that the escape route is illuminated at all material times.Escape route The route along which people can escape from any point in a building to a final exit.Evacuation lift A lift that may be used to evacuate people in a fire.Exit passageway A protected passageway that connects a protected stairway to a final exit. NOTE: Exit passageways should be protected to the same standard as the stairway they serve.*External wall The external wall of a building includes all of the following. • Anything located within any space forming part of the wall.• Any decoration or other finish applied to any external (but not internal) surface forming part of the wall.• Any windows and doors in the wall.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION132 Approved Document B Volume 2, 2019 edition Building Regulations 2010A• Any part of a roof pitched at an angle of more than 70 degrees to the horizontal if that part of the roof adjoins a space within the building to which persons have access, but not access only for the purpose of carrying out repairs or maintenance.Final exit The end of an escape route from a building that gives direct access to a street, passageway, walkway or open space, and is sited to ensure that people rapidly disperse away from the building so that they are no longer in danger from fire and/or smoke.NOTE: Windows are not acceptable as final exits.Fire alarm system Combination of components for giving an audible and/or other perceptible warning of fire. Fire damper A mechanical or intumescent device within a duct or ventilation opening that operates automatically and is designed to resist the spread of fire. Fire and smoke damper A fire damper which, in addition to the performance of the fire damper, resists the spread of smoke. Fire doorset A door or shutter which, together with its frame and furniture as installed in a building, is intended (when closed) to resist the spread of fire and/or gaseous products of combustion and meets specified performance criteria to those ends.NOTE: A fire doorset may have one or more leaves. The term includes a cover or other form of protection to an opening in a fire resisting wall or floor, or in a structure that surrounds a protected shaft. A fire doorset is a complete door assembly, assembled on site or delivered as a completed assembly, consisting of the door frame, leaf or leaves, essential hardware, edge seals and glazing, and any integral side panels or fanlight panels in an associated door screen.Firefighting lift A lift with additional protection and with controls that enable it to be used by the fire and rescue service when fighting a fire. (See Section 17.)Firefighting lobby A protected lobby that provides access from a firefighting stair to the accommodation area and to any associated firefighting lift.Firefighting shaft A protected enclosure that contains a firefighting stair, firefighting lobbies and, if provided, a firefighting lift together with its machine room.Firefighting stair A protected stairway that connects to the accommodation area through only a firefighting lobby.Fire resisting (Fire resistance) The ability of a component or a building to satisfy, for a stated period of time, some or all of the appropriate criteria given in the relevant standard.Fire-separating element A compartment wall, compartment floor, cavity barrier and construction that encloses a protected escape route and/or a place of special fire hazard.Fire-stop (Fire-stopping) A seal provided to close an imperfection of fit or design tolerance between elements or components, to restrict the spread of fire and smoke.*Flat A flat is a separate and self-contained premises constructed or adapted for use for residential purposes and forming part of a building from some other part of which it is divided horizontally. Gallery A floor or balcony that does not extend across the full extent of a building’s footprint and is open to the floor below. Habitable room A room used, or intended to be used, for people to live in (including, for the purposes of Approved Document B Volumes 1 and 2, a kitchen, but not a bathroom).Height (of a building or storey for the purposes of Approved Document B Volumes 1 and 2) • Height of a building is measured as shown in Appendix D, Diagram D4. • Height of the floor of the top storey above ground level is measured as shown in Appendix D, Diagram D6.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 133AInner room Room from which escape is possible only by passing through another room (the access room).Live/work unit A flat that is a workplace for people who live there, its occupants, and for people who do not live on the premises.Means of escape Structural means that provide one or more safe routes for people to go, during a fire, from any point in the building to a place of safety.Measurement • Width of a doorway, cubic capacity, area, height of a building and number of storeys are measured as shown in Appendix D, Diagrams D1 to D6.• Occupant number, travel distance, escape route and stairs are measured as described in Appendix D, paragraphs D1 to D4.Notional boundary A boundary presumed to exist between two buildings on the same site.Open spatial planning The internal arrangement of a building in which more than one storey or level is contained in one undivided volume, e.g. split-level floors. For the purposes of this document there is a distinction between open spatial planning and an atrium space.Perimeter (of a building) The maximum aggregate plan perimeter, found by vertical projection onto a horizontal plane. (See Section 15.)Pipe Includes pipe fittings and accessories. The definition of ‘pipe’ excludes a flue pipe and a pipe used for ventilating purposes, other than a ventilating pipe for an above-ground drainage system.Place of special fire hazard A room such as any of the following.• Oil-filled transformer room.• Switch gear room.• Boiler room.• Storage space for fuel or other highly flammable substance(s).• Room that houses a fixed internal combustion engine.Platform floor (also called an access or raised floor) A floor that is supported by a structural floor, but with an intervening cavity to house services.Protected circuit An electrical circuit that is protected against fire.Protected corridor/lobby A corridor or lobby that is adequately protected from fire in adjoining areas by fire resisting construction.Protected entrance hall/landing A circulation area, consisting of a hall or space in a flat, that is enclosed with fire resisting construction other than an external wall of a building.Protected shaft A shaft that enables people, air or objects to pass from one compartment to another, and which is enclosed with fire resisting construction.Protected stairway A stair that leads to a final exit to a place of safety and that is adequately enclosed with fire resisting construction. Included in the definition is any exit passageway between the foot of the stair and the final exit.Purpose group A classification of a building according to the purpose to which it is intended to be put. (See Table 0.1.)Relevant boundary The boundary or notional boundary that one side of the building faces and/or coincides with, and that is parallel or at an angle of a maximum of 80 degrees to that side of the building. Rooflight A dome light, lantern light, skylight, ridge light, glazed barrel vault or other element to admit daylight through a roof.Room An enclosed space within a building that is not used solely as a circulation space. The term includes not only conventional rooms, but also cupboards that are not fittings and large spaces such as warehouses and auditoria. The term does not include cavities such as ducts, ceiling cavities and roof spaces.School A place of education for children between 2 and 19 years old. The term includes nursery schools, primary schools and secondary schools as defined in the Education Act 1996.Self-closing device A device that closes a door, when open at any angle, against a door frame.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION134 Approved Document B Volume 2, 2019 edition Building Regulations 2010ANOTE: If the door is in a cavity barrier, rising butt hinges (which are different from the self-closing device mentioned above) are acceptable.Separated part (of a building) Part of a building that is separated from another part of the same building by a compartment wall. The wall runs the full height of the part and is in one vertical plane. (See Appendix D, Diagram D5.)Sheltered housing Includes two or more dwellings in the same building or on adjacent sites, designed and constructed as residential accommodation for vulnerable or elderly people who receive, or will receive, a support service.Single storey building A building that consists of a ground storey only. Basements are not counted as storeys in a building (see Appendix D). A separated part that consists of a ground storey only, with a roof to which access is only provided for repair or maintenance, may be treated as a single storey building.Site (of a building) The land occupied by the building, up to the boundaries with land in other ownership.*Solar shading device A device attached to the external surface of an external wall for reducing heat gain within a building by shading or deflecting sunlight. *Specified attachment Includes any of the following. • A balcony attached to an external wall.• A device for reducing heat gain within a building by deflecting sunlight which is attached to an external wall.• A solar panel attached to an external wall.Storey Includes any of the following.• Any gallery in an assembly building (purpose group 5).• Any gallery in any other type of building if its area is more than half that of the space into which it projects.• A roof, unless it is accessible only for maintenance and repair.NOTE: The building is regarded as a multi-storey building if both of the following apply.• There is more than one gallery. • The total aggregate area of all the galleries in one space is more than half the floor area of that space.Storey exit A final exit, or a doorway that gives direct access into a protected stairway, firefighting lobby or external escape route.NOTE: If an institutional building is planned to enable progressive horizontal evacuation, a door in a compartment wall is considered a storey exit for the purposes of requirement B1. Suspended ceiling (fire-protecting) A ceiling suspended below a floor that adds to the fire resistance of the floor. Thermoplastic material Any synthetic polymeric material that has a softening point below 200°C if tested to BS EN ISO 306 Method A120. Specimens for this test may be fabricated from the original polymer where the thickness of material of the end product is less than 2.5mm.Travel distance (unless otherwise specified, e.g. as in the case of flats) The distance that a person would travel from any point within the floor area to the nearest storey exit, determined by the layout of walls, partitions and fittings.Unprotected area (in relation to a side or external wall of a building) All of the following are classed as unprotected areas.• Any part of the external wall that has less than the relevant fire resistance set out in Section 13.• Any part of the external wall constructed of material more than 1mm thick if that material does not have a class B-s3, d2 rating or better, which is attached or applied, whether for cladding or any other purpose. • Windows, doors or other openings. This does not include windows that are designed and glazed to give the necessary level of fire resistance and that are not openable. NOTE: Recessed car parking areas as shown in Diagram A1 should not be regarded as unprotected areas.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 135AANOTE:The parking area should beboth of the following:a. Open fronted.b. Separated from the remainder of the building by a compartment wall(s) and floor(s) having not less than the period of fire resistance specified in Table B4 in Appendix B.Diagram A1 Recessed car parking areasONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION136 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBAppendix B: Performance of materials, products and structuresIntroductionB1 Much of the guidance in this document is given in terms of performance classifications in relation to British or European Standards. In such cases, it will be necessary to demonstrate that a system or product can meet the relevant performance classification. This will be achieved if the system or product complies with one of the following.a. They should be in accordance with a specification or design that has been shown by a specific test to be capable of meeting that performance classification.b. They should have been designed by using relevant design standards in order to meet that performance classification.c. They should have been assessed by applying relevant test evidence, in lieu of carrying out a specific test, as being capable of meeting that performance classification.NOTE: Some products are subject to Classification Without Further Testing (CWFT). For the purposes of this approved document, such products can be considered to have been shown to be capable of meeting a performance specification as per paragraph B1a. B2 Any test evidence used to demonstrate the fire performance classification of a product or system should be carefully checked to ensure that it is applicable to the intended use. Small differences in detail, such as fixing method, joints, dimensions, the introduction of insulation materials and air gaps (ventilated or not), can significantly affect the performance.B3 Assessments should not be regarded as a way to avoid a test where one is necessary. Assessments should only be carried out where sufficient relevant test evidence is available. Relevant test evidence is unlikely to be provided by test standards which have different classification criteria.B4 Where it is proposed to assess the classification of a product or system in lieu of carrying out a specific test (as in paragraph B1c), this should be done in accordance with the relevant standard for extended application for the test in question and should include details of the test evidence that has been used to support the assessment. For performance classifications where there is no specific standard for extended application, assessment reports should be produced in accordance with the principles of BS EN 15725 and should include details of the test evidence that has been used to support the assessment. Further information on best practice is provided in the Passive Fire Protection Forum’s Guide to Undertaking Technical Assessments of the Fire Performance of Construction Products Based on Fire Test Evidence.NOTE: Regulation 7(2) limits components used in or on the external walls of certain buildings to materials achieving class A2-s1, d0 or class A1 (see Section 12). Assessments cannot be used to demonstrate compliance with this requirement. B5 Tests and assessments should be carried out by organisations with the necessary expertise. For example, organisations listed as ‘notified bodies’ in accordance with the European Construction ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 137BBBProducts Regulation or laboratories accredited by the United Kingdom Accreditation Service (UKAS) for the relevant test standard can be assumed to have the necessary expertise. NOTE: Standard fire tests do not directly measure fire hazard. They measure or assess the response of a material or system to exposure to one or more aspects of fire conditions. Performance in fire tests is only one of a number of factors that should be taken into account.Reaction to fireB6 Reaction to fire relates to the degree to which a product will contribute, by its own decomposition, to a fire under specified conditions. Products, other than floorings, are classified as A1, A2, B, C, D, E or F (with class A1 being the highest performance and F being the lowest) in accordance with BS EN 13501-1. Class F is assigned when a product fails to attain class E. Untested products cannot be classified in accordance with BS EN 13501-1. Materials covered by the Classification Without Further Testing (CWFT) process can be found by accessing the European Commission’s website https://eur-lex.europa.eu/.B7 The classes of reaction to fire performance of A2, B, C, D and E are accompanied by additional classifications related to the production of smoke (s1, s2, s3), with s1 indicating the lowest production, and/or flaming droplets/particles (d0, d1, d2), with d0 indicating the lowest production. NOTE: When a classification includes s3, d2 this means that there is no limit set for smoke production and/or flaming droplets/particles.B8 To reduce the testing burden on manufacturers, BS EN 13238 defines a number of standard substrates that produce test results representative of different end use applications. The classification for reaction to fire achieved during testing is only valid when the product is used within this field of application, i.e. when the product is fixed to a substrate of that class in its end use. The standard substrate selected for testing should take account of the intended end use applications (field of application) of the product and represent end use substrates that have a density of a minimum of 75% of the standard substrate’s nominal density. B9 Standard substrates include gypsum plasterboard (BS EN 520) with a density of 700+/-100kg/m3, calcium silicate board (BS EN 14306) 870+/-50kg/m3 and fibre-cement board 1800+/-200kg/m3.NOTE: Standard calcium silicate board is not representative of gypsum plasterboard end use (due to the paper layer), but would be representative of most gypsum plasters (with densities of more than 650kg/m3). NOTE: Classifications based on tests using a plasterboard substrate would also be acceptable for products bonded to a gypsum plaster end use substrate.National classifications for reaction to fireB10 This document uses the European classification system for reaction to fire set out in BS EN 13501-1; however, there may be some products lawfully on the market using the classification system set out in previous editions. Where this is the case, Table B1 can be used for the purposes of this document.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION138 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBTable B1 Reaction to fire classifications: transposition to national class BS EN 13501‑1 classificationTranspositionA1Material that, when tested to BS 476-11, does not either:a. flameb. cause a rise in temperature on either the thermocouple at the centre of the specimen or in the furnacesA2-s1, d0NoneA2-s3, d2Material that meets either of the following.a. Any material of density 300kg/m3 or more, which, when tested to BS 476-11, complies with both of the following:i. does not flameii. causes a rise in temperature on the furnace thermocouple not exceeding 20°Cb. Any material of density less than 300kg/m3, which, when tested to BS 476-11, complies with both of the following:i. does not flame for more than 10 secondsii. causes a rise in temperature on the thermocouple at the centre of the specimen or in the furnace that is a maximum of 35°C and on the furnace thermocouple that is a maximum of 25°CB-s3, d2Any material that meets both of the following criteria.a. Class 1 in accordance with BS 476-7.b. Has a fire propagation index (I) of a maximum of 12 and sub-index (i1) of a maximum of 6, determined by using the method given in BS 476-6. Index of performance (I) relates to the overall test performance, whereas sub-index (i1) is derived from the first three minutes of the testC-s3, d2Class 1 in accordance with BS 476-7D-s3, d2Class 3 in accordance with BS 476-7NOTE: The national classifications do not automatically equate with the transposed classifications in the ‘BS EN 13501-1 classification’ column, therefore products cannot typically assume a European class unless they have been tested accordingly.NOTE: A classification of s3, d2 indicates that no limit is set for production of smoke and/or flaming droplets/particles. If a performance for production of smoke and/or flaming droplets/particles is specified, then only the European classes can be used. For example, a national class may not be used as an alternative to a classification which includes s1, d0. Thermoplastic materialsB11 Thermoplastic material is any synthetic polymeric material that has a softening point below 200°C if tested to BS EN ISO 306 Method A120. Products formed from these materials cannot always be classified in the normal way. In those circumstances the following approach can be followed. B12 Thermoplastic materials used for window glazing, rooflights and lighting diffusers within suspended ceilings do not need to meet the criteria within paragraph B19 onwards, if the guidance to requirements B2 and B4 is followed.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 139BBBB13 For the purposes of requirements B2 and B4, thermoplastic materials should be classified as TP(a) rigid, TP(a) flexible or TP(b), as follows:a. TP(a) rigidi. rigid solid uPVC sheetii. solid (as distinct from double- or multi-skinned) polycarbonate sheet a minimum of 3mm thickiii. multi-skinned rigid sheet made from uPVC or polycarbonate that has a class 1 rating when tested to BS 476-7iv. any other rigid thermoplastic product, a specimen of which (at the thickness of the product as put on the market), when tested to BS 2782-0 Method 508A, performs so that both: • the test flame extinguishes before the first mark • the duration of flaming or afterglow does not exceed 5 seconds following removal of the burner.b. TP(a) flexibleFlexible products a maximum of 1mm thick that comply with the Type C requirements of BS 5867-2 when tested to BS 5438 Test 2 with the flame applied to the surface of the specimens for 5, 15, 20 and 30 seconds respectively, but excluding the cleansing procedure; andc. TP(b)i. rigid solid polycarbonate sheet products a maximum of 3mm thick, or multi-skinned polycarbonate sheet products that do not qualify as TP(a) by testii. other products which, when a specimen of the material between 1.5 and 3mm thick is tested in accordance with BS 2782-0 Method 508A, have a maximum rate of burning of 50mm/minute.NOTE: If it is not possible to cut or machine a 3mm thick specimen from the product, then a 3mm test specimen can be moulded from the same material as that used to manufacture the product.B14 A thermoplastic material alone when used as a lining to a wall or ceiling cannot be assumed to protect a substrate. The surface rating of both thermoplastic material and substrate must therefore meet the required classification. If, however, the thermoplastic material is fully bonded to a non-thermoplastic substrate, then only the surface rating of the composite needs to meet the required classification.RoofsB15 Performance of the resistance of roofs to external fire exposure is measured in terms of penetration through the roof construction and the spread of flame over its surface.B16 Roof constructions are classified within the European system as BROOF(t4), CROOF(t4), DROOF(t4), EROOF(t4) or FROOF(t4) in accordance with BS EN 13501-5. BROOF(t4) indicates the highest performance and FROOF(t4) the lowest.B17 BS EN 13501-5 refers to four separate roof tests. The suffix (t4) used in paragraph B16 indicates that Test 4 is to be used for the purposes of this approved document.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION140 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBB18 This document uses the European classification system for roof covering set out in BS EN 13501-5; however, there may be some products lawfully on the market using the classification system set out in previous editions. Where this is the case, Table B2 can be used for the purposes of this document.Table B2 Roof covering classifications: transposition to national classBS EN 13501-5 classificationTransposition to BS 476-3 classificationBROOF (t4)AA, AB or ACCROOF(t4)BA, BB or BCDROOF(t4)CA, CB or CCEROOF(t4)AD, BD or CDFROOF(t4)DA, DB, DC or DDNOTE: The national classifications do not automatically equate with the transposed classifications in the European column, therefore products cannot typically assume a European class unless they have been tested accordingly.Fire resistanceB19 Common to all of the provisions of Part B of the Building Regulations is the property of fire resistance. Fire resistance is a measure of one or more of the following.a. Resistance to collapse (loadbearing capacity), which applies to loadbearing elements only, denoted R in the European classification of the resistance to fire performance.b. Resistance to fire penetration (integrity), denoted E in the European classification of the resistance to fire performance.c. Resistance to the transfer of excessive heat (insulation), denoted I in the European classification of the resistance to fire performance.B20 The standards of fire resistance necessary for a particular building are based on assumptions about the severity of fires and the consequences should an element fail. Fire severity is estimated in very broad terms from the use of the building (its purpose group), on the assumption that the building contents (which constitute the fire load) are similar for buildings with the same use.B21 Because the use of buildings may change, a precise estimate of fire severity based on the fire load due to a particular use may be misleading. Therefore if a fire engineering approach of this kind is adopted, the likelihood that the fire load may change in the future needs to be considered.B22 Performance in terms of the fire resistance to be achieved by elements of structure, doors and other forms of construction is classified in accordance with one of the following.a. BS EN 13501-2.b. BS EN 13501-3.c. BS EN 13501-4.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 141BBBB23 Fire resistance is measured in minutes. This relates to time elapsed in a standard test and should not be confused with real time.B24 The fire resistance necessary for different circumstances is set out in the following tables.a. Table B3 gives the specific requirements for each element of structure.b. Table B4 sets out the minimum periods of fire resistance for elements of structure.c. Table B5 sets out limitations on the use of uninsulated fire resisting glazed elements.B25 This document uses the European classification system for fire resistance set out in BS EN 13501-2 to 4; however, there may be some products lawfully on the market using the classification system set out in previous editions. In those situations the alternative classifications given in Table B3 can be used.Table B3 Specific provisions of the test for fire resistance of elements of structure, etc. Part of buildingMinimum provisions when tested to the relevant European standard (minutes)(1)Alternative minimum provisions when tested to the relevant part of BS 476(2) (minutes)Type of exposureLoadbearing capacity(3)IntegrityInsulation1. Structural frame, beam or column.R see Table B4See Table B4Not applicableNot applicableExposed faces 2. Loadbearing wall (for a wall which is also described in any of the following items, the more onerous guidance should be applied).R see Table B4See Table B4Not applicableNot applicableEach side separately3. Floors(4)a. between a shop and flat aboveREI 60 or see Table B4 (whichever is greater)60 min or see Table B4 (whichever is greater)60 min or see Table B4 (whichever is greater)60 min or see Table B4 (whichever is greater)From underside(5)b. in upper storey of two storey dwellinghouse (but not over garage or basement)R 30 and EI 15 30 min15 min15 minFrom underside(5)c. any other floor – including compartment floors.REI see Table B4See Table B4See Table B4See Table B4From underside(5)ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION142 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5BTable B3 ContinuedPart of buildingMinimum provisions when tested to the relevant European standard (minutes)(1)Alternative minimum provisions when tested to the relevant part of BS 476(2) (minutes)Type of exposureLoadbearing capacity(3)IntegrityInsulation4. Roofsa. any part forming an escape routeREI 3030 min 30 min 30 min From underside(5)b. any roof that performs the function of a floor.REI see Table B4See Table B4See Table B4See Table B4From underside(5)5. External wallsa. any part a maximum of 1000mm from any point on the relevant boundary(6)REI see Table B4See Table B4See Table B4See Table B4Each side separatelyb. any part a minimum of 1000mm from the relevant boundary(6)RE see Table B4 and I 15See Table B4See Table B415 minFrom inside the building c. any part beside an external escape route (Section 2 Diagram 2.7 of Approved Document B Volume 1 and Section 3, Diagram 3.4).RE 3030 min30 minNo provision(7) (8)From inside the building6. Compartment walls Separating either:a. a flat from any other part of the building (see paragraph 7.1 of Approved Document B Volume 1)REI 60 or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)Each side separatelyb. occupancies.REI 60 or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)60 min or see Table B4 (whichever is less)Each side separately7. Compartment walls (other than in item 6 or item 10).REI see Table B4See Table B4See Table B4See Table B4Each side separatelyONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 143B1BBTable B3 ContinuedPart of buildingMinimum provisions when tested to the relevant European standard (minutes)(1)Alternative minimum provisions when tested to the relevant part of BS 476(2) (minutes)Type of exposureLoadbearing capacity(3)IntegrityInsulation8. Protected shafts Excluding any firefighting shaft:a. any glazing described in Section 8 diagram 8.4 E 30Not applicable30 minNo provision(8)Each side separatelyb. any other part between the shaft and a protected lobby/corridor described in Section 8 diagram 8.4REI 3030 min30 min30 minEach side separatelyc. any part not described in (a) or (b) above. REI see Table B4See Table B4See Table B4See Table B4Each side separately9. Enclosure (that does not form part of a compartment wall or a protected shaft) to a:a. protected stairwayREI 30(8)30 min30 min30 min(8)Each side separatelyb. lift shaft.REI 3030 min30 min30 minEach side separately10. Wall or floor separating an attached or integral garage from a dwellinghouseREI 30(8)30 min30 min30 min(8)From garage side11. Fire resisting construction in dwellinghouses not described elsewhereREI 30(8)30 min30 min30 min(8)Each side separately12. Firefighting shaftsREI 120120 min120 min120 minFrom side remote from shafta. construction that separates firefighting shaft from rest of buildingREI 6060 min60 min60 minFrom shaft sideb. construction that separates firefighting stair, firefighting lift shaft and firefighting lobby.REI 6060 min60 min60 minEach side separatelyONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION144 Approved Document B Volume 2, 2019 edition Building Regulations 2010B5BTable B3 ContinuedPart of buildingMinimum provisions when tested to the relevant European standard (minutes)(1)Alternative minimum provisions when tested to the relevant part of BS 476(2) (minutes)Type of exposureLoadbearing capacity(3)IntegrityInsulation13. Enclosure (that is not a compartment wall or described in item 8) to a:a. protected lobbyREI 30(8)30 min30 min30 min(8)Each side separatelyb. protected corridor.REI 30(8)30 min30 min30 min(8)Each side separately14. Sub-division of a corridorREI 30(8)30 min30 min30 min(8)Each side separately15. Fire resisting constructiona. construction that encloses places of special fire hazardREI 3030 min30 min30 minEach side separatelyb. construction between store rooms and sales area in shopsREI 3030 min30 min30 minEach side separatelyc. fire resisting sub-divisionREI 3030 min30 min30 minEach side separatelyd. construction that encloses bedrooms and ancillary accommodation in care homes. REI 3030 min30 min30 minEach side separately16. Enclosure in a flat to a protected entrance hall, or to a protected landing.REI 30(8)30 min30 min30 min(8)Each side separately17. Cavity barrierE 30 and I 15Not applicable30 min15 minEach side separately18. Ceiling see paragraph 2.5, Diagram 2.3 of Approved Document B Volume 1 and paragraph 9.5 and Diagram 9.3.EI 30Not applicable30 min30 minFrom underside19. Duct described in paragraph 9.17e.E 30Not applicable30 minNo provisionFrom outside20. Casing around a drainage system described in Diagram 9.1 of Approved Document B Volume 1.E 30Not applicable30 minNo provisionFrom outsideONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 145B1BBTable B3 ContinuedPart of buildingMinimum provisions when tested to the relevant European standard (minutes)(1)Alternative minimum provisions when tested to the relevant part of BS 476(2) (minutes)Type of exposureLoadbearing capacity(3)IntegrityInsulation21. Flue walls described in Diagram 10.4.EI half the period given in Table B4 for the compartment wall/floorNot applicableHalf the period given in Table B4 for the compartment wall/floorHalf the period given in Table B4 for the compartment wall/floorFrom outside22. Construction described in note (a) to paragraph 12.9 of Approved Document B Volume 1.EI 30 Not applicable30 min30 minFrom underside23. Fire doorsetsSee Table C1See Table C1See Appendix CNOTES:1. BS EN 13501-2 Classification using data from fire resistance tests, excluding ventilation services. BS EN 13501-3 Classification using data from fire resistance tests on products and elements used in building service installations: fire resisting ducts and fire dampers. BS EN 13501-4 Classification using data from fire resistance tests on components of smoke control systems.In the European classification: ‘R’ is the resistance to fire in terms of loadbearing capacity. ‘E’ is the resistance to fire in terms of integrity.‘I’ is the resistance to fire in terms of insulation.The national classifications do not automatically equate with the alternative classifications in the European column, therefore products cannot typically assume a European class unless they have been tested accordingly.2. BS 476-20 for general principles, BS 476-21 for loadbearing elements, BS 476-22 for non-loadbearing elements, BS 476-23 for fire-protecting suspended ceilings and BS 476-24 for ventilation ducts. 3. Applies to loadbearing elements only (see paragraph B19).4. Guidance on increasing the fire resistance of existing timber floors is given in BRE Digest 208.5. Only if a suspended ceiling meets the appropriate provisions should it be relied on to add to the fire resistance of the floor.6. Such walls may contain areas that do not need to be fire resisting (unprotected areas). See Section 13.7. Unless needed as part of a wall in item 5a or 5b.8. Except for any limitations on uninsulated glazed elements given in Table B5.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION146 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBTable B4 Minimum periods of fire resistance Purpose group of buildingMinimum periods of fire resistance(1) (minutes) in a:Basement storey* including floor overGround or upper storeyDepth (m) of the lowest basementHeight (m) of top floor above ground, in a building or separated part of a buildingMore than 10Up to 10Up to 5Up to 11Up to 18Up to 30More than 301. Residential:a. Block of flats – without sprinkler system90 min60 min30 min† 60 min+§Not permitted(2)Not permitted(2)Not permitted(2) – with sprinkler system(3)90 min 60 min30 min†60 min+§60 min+§90 min+120 min+b. and c. DwellinghouseNot applicable(4)30 min*†30 min†60 min(5)60 min(5)Not applicable(4)Not applicable(4)2. Residentiala. Institutional 90 min60 min30 min†60 min60 min90 min120 min‡b. Other residential90 min60 min30 min†60 min60 min90 min120 min‡ 3. Office: – without sprinkler system90 min60 min30 min†60 min60 min90 minNot permitted(6) – with sprinkler system(3)60 min60 min30 min†30 min†30 min†60 min120 min‡4. Shop and commercial: – without sprinkler system90 min60 min60 min60 min60 min90 minNot permitted(6) – with sprinkler system(3)60 min60 min30 min†60 min60 min60 min120 min‡5. Assembly and recreation: – without sprinkler system90 min60 min60 min60 min60 min90 minNot permitted(6) – with sprinkler system(3)60 min60 min30 min†60 min60 min60 min120 min‡6. Industrial: – without sprinkler system120 min90 min60 min90 min90 min120 minNot permitted(6) – with sprinkler system(3)90 min60 min30 min†60 min60 min90 min120 min‡7. Storage and other non-residential:a. any building or part not described elsewhere: – without sprinkler system120 min90 min60 min90 min90 min120 minNot permitted(6) – with sprinkler system(3)90 min60 min30 min†60 min60 min90 min120 min‡ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 147BBBTable B4 ContinuedPurpose group of buildingMinimum periods of fire resistance(1) (minutes) in a:Basement storey* including floor overGround or upper storeyDepth (m) of the lowest basementHeight (m) of top floor above ground, in a building or separated part of a buildingMore than 10Up to 10Up to 5Up to 11Up to 18Up to 30More than 30b. car park for light vehicles: i. open sided car park(7)Not applicableNot applicable15 min†#15 min†#(8)15 min†#(8)15 min†#(8)60 min ii. any other car park90 min60 min30 min†60 min60 min 90 min120 min‡NOTES:For single storey buildings, the periods under the heading ‘Up to 5’ apply. If single storey buildings have basements, for the basement storeys the period appropriate to their depth applies.* For the floor over a basement or, if there is more than one basement, the floor over the topmost basement, the higher of the period for the basement storey and the period for the ground or upper storey applies.† For compartment walls that separate buildings, the period is increased to a minimum of 60 minutes.+ For any floor that does not contribute to the support of the building within a flat of more than one storey, the period is reduced to 30 minutes. § For flat conversions, refer to paragraphs 6.5 to 6.7 of Approved Document B Volume 1 regarding the acceptability of 30 minutes. ‡ For elements that do not form part of the structural frame, the period is reduced to 90 minutes.# For elements that protect the means of escape, the period is increased to 30 minutes.1. Refer to note 1, Table B3 for the specific provisions of test.2. Blocks of flats with a top storey more than 11m above ground level (see Diagram D6) should be fitted with a sprinkler system in accordance with Appendix E.NOTE: Sprinklers should be provided within the individual flats, they do not need to be provided in the common areas such as stairs, corridors or landings when these areas are fire sterile. 3. ‘With sprinkler system’ means that the building is fitted throughout with an automatic sprinkler system in accordance with Appendix E.4. Very large (with a top storey more than 18m above ground level or with a 10m deep basement) or unusual dwellinghouses are outside the scope of the guidance provided with regard to dwellinghouses. 5. A minimum of 30 minutes in the case of three storey dwellinghouses, increased to 60 minutes minimum for compartment walls separating buildings.6. Buildings within the ‘office’, ‘shop and commercial’, ‘assembly and recreation’, ‘industrial’ and ‘storage and other non-residential’ (except car parks for light vehicles) purpose groups (purpose groups 3 to 7(a)) require sprinklers where there is a top storey more than 30m above ground level. 7. The car park should comply with the relevant provisions in the guidance on requirement B3, Section 11.8. For the purposes of meeting the Building Regulations, the following types of steel elements are deemed to have satisfied the minimum period of fire resistance of 15 minutes when tested to the European test method.i. Beams supporting concrete floors, maximum Hp/A=230m-1 operating under full design load.ii. Free-standing columns, maximum Hp/A=180m-1 operating under full design load.iii. Wind bracing and struts, maximum Hp/A=210m-1 operating under full design load.Guidance is also available in BS EN 1993-1-2.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION148 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBApplication of the fire resistance standards in Table B4B26 The following guidance should be used when applying the fire resistance standards in Table B4.a. If one element of structure supports or carries or gives stability to another, the fire resistance of the supporting element should be no less than the minimum period of fire resistance for the other element (whether that other element is loadbearing or not). In some circumstances, it may be reasonable to vary this principle, for example:i. if the supporting structure is in the open air and is not likely to be affected by the fire in the buildingii. if the supporting structure is in a different compartment, with a fire-separating element (that has the higher standard of fire resistance) between the supporting and the separated structureiii. if a plant room on the roof needs greater fire resistance than the elements of structure that support it.b. If an element of structure forms part of more than one building or compartment, that element should be constructed to the standard of the higher of the relevant provisions.c. If, due to the slope of the ground, one side of a basement is open at ground level (allowing smoke to vent and providing access for firefighting) for elements of structure in that storey it may be appropriate to adopt the standard of fire resistance that applies to above-ground structures.d. Although most elements of structure in a single storey building may not need fire resistance, fire resistance is needed if one of the following applies to the element.i. It is part of, or supports, an external wall, and there is provision in the guidance on requirement B4 to limit the extent of openings and other unprotected areas in the wall.ii. It is part of, or supports, a compartment wall, including a wall that is common to two or more buildings.iii. It supports a gallery.B27 For the purposes of this paragraph, the ground storey of a building that has one or more basement storeys and no upper storeys may be considered as a single storey building. The fire resistance of the basement storeys should be that specified for basements.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 149BBBTable B5 Limitations on the use of uninsulated glazed elements on escape routes. These limitations do not apply to glazed elements that satisfy the relevant insulation criterion, see Table B3 Position of glazed elementMaximum total glazed area in parts of a building with access to:A single stairMore than one stairWallsDoor leafWallsDoor leafFlats1.Within the enclosures of a protected entrance hall or protected landing, or within fire resisting separation shown in Section 3, Diagram 3.4, of Approved Document B Volume 1.Fixed fanlights onlyUnlimited above 1100mm from floorFixed fanlights onlyUnlimited above 1100mm from floorDwellinghouses2.Within either:a. the enclosures of a protected stairwayb. fire resisting separation shown in Diagram 2.2 of Approved Document B Volume 1.Unlimited above 1100mm from floor or pitch of the stairUnlimitedUnlimited above 1100mm from floor or pitch of the stairUnlimited3.Within fire resisting separation either:a. shown in Diagram 2.4 of Approved Document B Volume 1 b. described in paragraph 2.16b of Approved Document B Volume 1.Unlimited above 100mm from floorUnlimited above 100mm from floorUnlimited above 100mm from floorUnlimited above 100mm from floor4.Existing window between an attached/integral garage and the dwellinghouse.UnlimitedNot applicableUnlimitedNot applicable5.Adjacent to an external escape stair (see paragraph 2.17 and Diagram 2.7 of Approved Document B Volume 1) or roof escape route (see paragraph 2.13 of Approved Document B Volume 1).UnlimitedUnlimitedUnlimitedUnlimitedGeneral (except dwellinghouses)6.Between residential/sleeping accommodation and a common escape route (corridor, lobby or stair).NilNilNilNil7.Between a protected stairway(1) and either:a. the accommodationb. a corridor that is not a protected corridor other than in item 6 above.Nil25% of door areaUnlimited above 1100mm(2)50% of door area8.Between either:a. a protected stairway(1) and a protected lobby or protected corridorb. accommodation and a protected lobby other than in item 6 above.Unlimited above 1100mm from floorUnlimited above 100mm from floorUnlimited above 100mm from floorUnlimited above 100mm from floorONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION150 Approved Document B Volume 2, 2019 edition Building Regulations 2010BBTable B5 ContinuedPosition of glazed elementMaximum total glazed area in parts of a building with access to:A single stairMore than one stairWallsDoor leafWallsDoor leaf9.Between the accommodation and a protected corridor that forms a dead end, other than in item 6 above.Unlimited above 1100mm from floorUnlimited above 100mm from floorUnlimited above 1100mm from floorUnlimited above 100mm from floor10.Between accommodation and any other corridor, or subdividing corridors, other than in item 6 above.Not applicableNot applicableUnlimited above 100mm from floorUnlimited above 100mm from floor11.Beside an external escape route.Unlimited above 1100mm from floorUnlimited above 1100mm from floorUnlimited above 1100mm from floorUnlimited above 1100mm from floor12.Beside an external escape stair (see paragraph 3.32 and Diagram 3.4) or roof escape route (see paragraph 2.32).UnlimitedUnlimitedUnlimitedUnlimitedNOTES:Items 1 and 8 apply also to single storey buildings.Fire resisting glass should be marked with the name of the manufacturer and the name of the product.Further guidance can be found in A Guide to Best Practice in the Specification and Use of Fire-resistant Glazed Systems published by the Glass and Glazing Federation.1. If the protected stairway is also a protected shaft or a firefighting stair (see Section 17), there may be further restrictions on the use of glazed elements.2. Measured vertically from the landing floor level or the stair pitch line.3. The 100mm limit is intended to reduce the risk of fire spreading from a floor covering.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 151CBCAppendix C: Fire doorsetsC1 All fire doorsets should have the performance shown in Table C1, based on one of the following.a. Fire resistance in terms of integrity, for a period of minutes, when tested to BS 476-22, e.g. FD 30. A suffix (S) is added for doorsets where restricted smoke leakage at ambient temperatures is needed.b. As determined with reference to Commission Decision 2000/367/EC regarding the classification of the resistance to fire performance of construction products, construction works and parts thereof. All fire doorsets should be classified in accordance with BS EN 13501-2, tested to the relevant European method from the following.i. BS EN 1634-1.ii. BS EN 1634-2.iii. BS EN 1634-3.c. As determined with reference to European Parliament and Council Directive 95/16/EC (which applies to lifts that permanently serve buildings and constructions and specified safety components) on the approximation of laws of Member States relating to lifts (‘Lifts Directive’) implementing the Lifts Regulations 1997 (SI 1997/831) and calling upon the harmonised standard BS EN 81-58.C2 The performance requirement is in terms of integrity (E) for a period of minutes. An additional classification of Sa is used for all doors where restricted smoke leakage at ambient temperatures is needed.C3 The requirement is for test exposure from each side of the doorset separately. The exception is lift doors, which are tested from the landing side only.C4 Any test evidence used to verify the fire resistance rating of a doorset or shutter should be checked to ensure both of the following.a. It adequately demonstrates compliance.b. It is applicable to the complete installed assembly. Small differences in detail may significantly affect the rating.Until relevant harmonised product standards are published, for the purposes of meeting the Building Regulations, products tested in accordance with BS EN 1634-1 (with or without pre-fire test mechanical conditioning) that achieve the minimum performance in Table C1 will be deemed to satisfy the provisions.C5 All fire doorsets, including to flat entrances and between a dwellinghouse and an integral garage, should be fitted with a self-closing device, except for all of the following.a. Fire doorsets to cupboards.b. Fire doorsets to service ducts normally locked shut.c. Fire doorsets within flats and dwellinghouses.C6 If a self-closing device would be considered to interfere with the normal approved use of the building, self-closing fire doors may be held open by one of the following.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION152 Approved Document B Volume 2, 2019 edition Building Regulations 2010CCa. A fusible link, but not if the doorset is in an opening provided as a means of escape unless it complies with paragraph C7.b. An automatic release mechanism activated by an automatic fire detection and alarm system.c. A door closer delay device.C7 Two fire doorsets may be fitted in the same opening if each door is capable of closing the opening, so the total fire resistance is the sum of their individual resistances. If the opening is provided as a means of escape, both fire doorsets should be self-closing.If one fire doorset is capable of being easily opened by hand and has a minimum of 30 minutes’ fire resistance, the other fire doorset should comply with both of the following.a. Be fitted with an automatic self-closing device.b. Be held open by a fusible link.C8 Fire doorsets often do not provide any significant insulation. Unless providing both integrity and insulation in accordance with Appendix B, Table B3, a maximum of 25% of the length of a compartment wall should consist of door openings.Where it is practicable to maintain a clear space on both sides of the doorway, the above percentage may be greater.C9 Rolling shutters should be capable of manual opening and closing for firefighting purposes (see Section 17). Rolling shutters across a means of escape should only be released by a heat sensor, such as a fusible link or electric heat detector, in the immediate vicinity of the door. Unless a shutter is also intended to partially descend as part of a boundary to a smoke reservoir, shutters across a means of escape should not be closed by smoke detectors or a fire alarm system.C10 Unless shown to be satisfactory when tested as part of a fire doorset assembly, the essential components of any hinge on which a fire door is hung should be made entirely from materials that have a minimum melting point of 800°C.C11 Except for doorsets listed in paragraph C12, all fire doorsets should be marked with one of the following fire safety signs, complying with BS 5499-5, as appropriate.a. To be kept closed when not in use – mark ‘Fire door keep shut’.b. To be kept locked when not in use – mark ‘Fire door keep locked shut’.c. Held open by an automatic release mechanism or free swing device – mark ‘Automatic fire door keep clear’.All fire doorsets should be marked on both sides, except fire doorsets to cupboards and service ducts, which should be marked on the outside.C12 The following fire doorsets are not required to comply with paragraph C11.a. Doors to and within flats and dwellinghouses.b. Bedroom doors in ‘residential (other)’ (purpose group 2(b)) premises.c. Lift entrance/landing doors.C13 The performance of some doorsets set out in Table C1 is linked to the minimum periods of fire resistance for elements of structure given in Tables B3 and B4. Limitations on the use of uninsulated glazing in fire doorsets are given in Table B5.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 153CCCC14 Recommendations for the specification, design, construction, installation and maintenance of fire doorsets constructed with non-metallic door leaves are given in BS 8214.Guidance on timber fire resisting doorsets, in relation to the new European test standard, may be found in Timber Fire Resisting Doorsets: Maintaining Performance Under the New European Test Standard published by the Timber Research and Development Association (TRADA).Guidance for metal doors is given in Code of Practice for Fire Resisting Metal Doorsets published by the Door and Shutter Manufacturers’ Association (DSMA).C15 Hardware used on fire doors can significantly affect their performance in a fire. Notwithstanding the guidance in this approved document, guidance is available in Hardware for Fire and Escape Doors published by the Door and Hardware Federation (DHF) and Guild of Architectural Ironmongers (GAI).Table C1 Provisions for fire doorsetsPosition of doorMinimum fire resistance of door in terms of integrity (minutes) when tested to the relevant European standard(1)Minimum fire resistance of door in terms of integrity (minutes) when tested to BS 476-221.In a compartment wall separating buildingsSame as for the wall in which the door is fitted, but a minimum of 60 minutesSame as for the wall in which the door is fitted, but a minimum of 60 minutes2.In a compartment wall:a. if it separates a flat from a space in common useE 30 Sa(2)FD 30 S(2) b. enclosing a protected shaft forming a stairway wholly or partly above the adjoining ground in a building used for flats, other residential, assembly and recreation, or office purposesE 30 Sa(2) FD 30 S(2)c. enclosing a protected shaft forming a stairway not described in (b) aboveHalf the period of fire resistance of the wall in which it is fitted, but 30 minutes minimum and with suffix Sa(2)Half the period of fire resistance of the wall in which it is fitted, but 30 minutes minimum and with suffix S(2)d. enclosing a protected shaft forming a lift or service shaftHalf the period of fire resistance of the wall in which it is fitted, but 30 minutes minimumHalf the period of fire resistance of the wall in which it is fitted, but 30 minutes minimume. not described in (a), (b), (c) or (d) above.Same as for the wall in which it is fitted, but add Sa(2) if the door is used for progressive horizontal evacuation under the guidance to requirement B1Same as for the wall in which it is fitted, but add S(2) if the door is used for progressive horizontal evacuation under the guidance to requirement B13.In a compartment floorSame as for the floor in which it is fittedSame as for the floor in which it is fittedONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION154 Approved Document B Volume 2, 2019 edition Building Regulations 2010CCTable C1 ContinuedPosition of doorMinimum fire resistance of door in terms of integrity (minutes) when tested to the relevant European standard(1)Minimum fire resistance of door in terms of integrity (minutes) when tested to BS 476-224.Forming part of the enclosures of:a. a protected stairway (except as described in item 9 or 11(b) below)E 30 Sa(2)FD 30 S(2)b. a lift shaft (see paragraph 5.34b) that does not form a protected shaft in 2(b), (c) or (d) above.E 30FD 305.Forming part of the enclosure of:a. a protected lobby approach (or protected corridor) to a stairwayE 30 Sa(2)FD 30 S(2)b. any other protected corridorE 20 Sa(2)FD 20 S(2)c. a protected lobby approach to a lift shaft (see paragraph 5.37 to 5.39).E 30 Sa(2)FD 30 S(2)6.Giving access to an external escape routeE 30FD 307.Sub-dividing:a. corridors connecting alternative exitsE 20 Sa(2)FD 20 S(2)b. dead-end portions of corridors from the remainder of the corridor.E 20 Sa(2)FD 20 S(2)8.Any door within a cavity barrierE 30FD 309.Any door that forms part of the enclosure to a protected entrance hall or protected landing in a flatE 20FD 2010.Any door that forms part of the enclosure:a. to a place of special fire hazardE 30FD 30b. to ancillary accommodation in care homes (see paragraph 2.44).E 30FD 3011.In a dwellinghouse:a. between a dwellinghouse and a garageE 30 Sa(2)FD 30 S(2)b. forming part of the enclosures to a protected stairway in a single family dwellinghouseE 20FD 20c. within any fire resisting construction in a dwellinghouse not described elsewhere in this table.E 20FD 20NOTES:1. Classified in accordance with BS EN 13501-2. National classifications do not necessarily equate with European classifications, therefore products cannot typically assume a European class unless they have been tested accordingly.2. Unless pressurisation techniques that comply with BS EN 12101-6 are used, these doors should also comply with one of the following conditions.a. Have a leakage rate not exceeding 3m3/m/hour (from head and jambs only) when tested at 25Pa under BS 476-31.1.b. Meet the additional Sa classification when tested to BS EN 1634-3.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 155DCDAppendix D: Methods of measurementOccupant numberD1 The number of occupants of a room, storey, building or part of a building is either of the following.a. The maximum number of people it is designed to hold.b. In buildings other than dwellings, the number of people calculated by dividing the area of a room or storey(s) (m2) by a floor space factor (m2 per person) such as given in Table D1 for guidance.D2 Counters and display units should be included when measuring area. All of the following should be excluded.a. Stair enclosures.b. Lifts.c. Sanitary accommodation.d. Any other fixed part of the building structure. ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION156 Approved Document B Volume 2, 2019 edition Building Regulations 2010DDTable D1 Floor space factors(1) Type of accommodation(2)(3)Floor space factor (m2/person)1. Standing spectator areas, bar areas (within 2m of serving point), similar refreshment areas 0.32. Amusement arcade, assembly hall (including a general purpose place of assembly), bingo hall, club, crush hall, dance floor or hall, venue for pop concerts and similar events and bar areas without fixed seating0.53. Concourse or queuing area(4) 0.74. Committee room, common room, conference room, dining room, licensed betting office (public area), lounge or bar (other than in (1) above), meeting room, reading room, restaurant, staff room or waiting room(5) 1.05. Exhibition hall or studio (film, radio, television, recording) 1.56. Skating rink 2.07. Shop sales area(6) 2.08. Art gallery, dormitory, factory production area, museum or workshop 5.09. Office 6.010. Shop sales area(7) 7.011. Kitchen or library 7.012. Bedroom or study-bedroom 8.013. Bed-sitting room, billiards or snooker room or hall 10.014. Storage and warehousing 30.015. Car park Two persons per parking spaceNOTES:1. As an alternative to using the values in the table, the floor space factor may be determined by reference to actual data taken from similar premises. Where appropriate, the data should reflect the average occupant density at a peak trading time of year.2. Where accommodation is not directly covered by the descriptions given, a reasonable value based on a similar use may be selected.3. Where any part of the building is to be used for more than one type of accommodation, the most onerous factor(s) should be applied. Where the building contains different types of accommodation, the occupancy of each different area should be calculated using the relevant space factor.4. For detailed guidance on appropriate floor space factors for concourses in sports grounds refer to Concourses published by the Football Licensing Authority.5. Alternatively the occupant number may be taken as the number of fixed seats provided, if the occupants will normally be seated.6. Shops excluding those under item 10, but including: supermarkets and department stores (main sales areas), shops for personal services, such as hairdressing, and shops for the delivery or collection of goods for cleaning, repair or other treatment or for members of the public themselves carrying out such cleaning, repair or other treatment.7. Shops (excluding those in covered shopping complexes but including department stores) trading predominantly in furniture, floor coverings, cycles, prams, large domestic appliances or other bulky goods, or trading on a wholesale self-selection basis (cash and carry).ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 157DDDTravel distanceD3 Travel distance is measured as the shortest route. Both of the following should be observed.a. If there is fixed seating or other fixed obstructions, the shortest route is along the centre line of the seatways and gangways. b. If the route includes a stair, the shortest route is along the pitch line on the centre line of travel.WidthD4 Width is measured according to the following.a. For a door (or doorway), the clear width when the door is open (Diagram D1).b. For an escape route, either of the following.i. When the route is defined by walls: the width at 1500mm above finished floor level.ii. Elsewhere: the minimum width of passage available between any fixed obstructions.c. For a stair, the clear width between the walls or balustrades. On escape routes and stairs, handrails and strings intruding into the width by a maximum of 100mm on each side may be ignored. Rails used for guiding a stair-lift may be ignored, but it should be possible to park the lift’s chair or carriage in a position that does not obstruct the stair or landing.Effective clear width (door stop to projecting ironmongery)Effective clearwidth (door stop to door leaf)Diagram D1 Measurement of door widthONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION158 Approved Document B Volume 2, 2019 edition Building Regulations 2010DDBuilding dimensionsIn every case measure thevolume contained byall of the following.a. Under surface of roof.b. Upper surface of lowest floor.c. Inner surface of enclosing walls. When there is not an outer enclosing wall, measure to the outermost edge of the floor slab.The measured volumeshould include internalwalls and partitions.b. Cubic capacity of compartmentsor separated part of a buildingCompartment floorCompartment wallInternal wallor partitionEnclosing walla. Cubic capacity of a buildingInternal wallor partitionEnclosing wallDiagram D2 Cubic capacityb. Floor area:Room, garage, conservatory or outbuilding,measure to inner surface of enclosing wallsc. Floor area:Storey, part or compartment,measure to inner surface of enclosing wallsand include internal walls and partitionsWhen there is notan outer enclosingwall, measure tothe outermost edgeof the floor slaba. Surface area: roofs and rooflights In each case measure the visible areaii. Double pitch roofIf a hipped roof,measure to outermost point of roof at base areaHighest pointof roof slopeLowest pointof roof slopeat eavesOutermostpointof roofSectionElevationi. Flat or monopitch roofIf a lean-to roof,measure from theface of wall to theoutermost point of roofMeasure from outermost point ofroof at eaves or vergeSectioniii. RooflightRooflightRoof sheetingSectionDiagram D3 AreaONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 159DDDHighest pointof roof slopeHeight ofbuildingMean roof levelMean ground levelLowest pointof roof slopeLowest levelof groundadjacent tooutside wallsHighest levelof groundadjacent tooutside wallsa. Double pitch roofb. Mansard type roofabMean roof levelMean ground levelHighest point ofparapet (includingcoping)Use height a or b, whichever is greaterTop levelof gutterMean roof levelHeight ofbuildingMean ground levelc. Flat or monopitch roofHighest pointof roof slopeLowest pointof roof slopeLowest levelof groundadjacent tooutside wallsHighest levelof groundadjacent tooutside wallsEqualEqualEqualHighest pointof roof slopeDiagram D4 Height of buildingONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION160 Approved Document B Volume 2, 2019 edition Building Regulations 2010DD In assembly buildings (purpose group 5), a gallery is included as a storey, but not if it is a loading gallery, fly gallery, stage grid, lighting bridge, or any gallery provided for similar purposes, or for maintenance and repair. In other purpose group buildings, galleries are not counted as a storey. For the definition of basement, see Appendix A. NOTES:1.2.3. BasementGroundfloorFirstfloorSecondfloorSeparated part three storeysBuilding three storeysSeparated part two storeysCompartmentwallBasementGroundfloorFirstfloorSecondfloorTo count the number of storeys in a building,or in a separated part of a building, count only atthe position which gives the greatest number andexclude any basement storeys.Diagram D5 Number of storeysPlantHeight of topstorey measuredfrom upper floorsurface of topfloor to groundlevel on lowestside of buildingHeight of top storey excludesroof-top plant areas and anytop storeys consisting exclusivelyof plant roomsRoofDiagram D6 Height of top storey in buildingONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 161DDDFree area of smoke ventilatorsD5 The free area of a smoke ventilator should be measured by either of the following.a. The declared aerodynamic free area in accordance with BS EN 12101-2.b. The total unobstructed cross-sectional area (geometric free area), measured in the plane where the area is at a minimum and at right angles to the direction of air flow (Diagram D7).Free areameasured atright angles toair flowFree area for louvredvent = a1+a2+a3+a4+a5a1a2a3a4a590°a.b.Diagram D7 Free area of smoke ventilatorsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION162 Approved Document B Volume 2, 2019 edition Building Regulations 2010EEAppendix E: Sprinklers Sprinkler systems E1 Sprinkler systems installed in buildings can reduce the risk to life and significantly reduce the degree of damage caused by fire within a building. E2 Further recommendations for the provision of sprinklers are provided in the following sections:Volume 1 – DwellingsFunctional requirementParagraphTitleB12.6Dwellinghouses with two or more storeys more than 4.5m above ground levelB12.23Loft conversionsB13.21Internal planning of multi-storey flatsB3Table B4Minimum periods of fire resistanceB37.4SprinklersB411.15Unprotected areas and fire resistance – portal framesB411.21Methods for calculating acceptable unprotected area – sprinkler systemsB515.7Provision of firefighting shaftsVolume 2 – Buildings other than dwellingsFunctional requirementParagraphTitleB12.46Residential care homes – sprinkler systemsB13.21Width of escape stairs – phased evacuationB15.46Shop store roomsB37.7Raised storage areasB3Table 8.1Maximum dimensions of building or compartmentB3Table B4Minimum periods of fire resistanceB38.14SprinklersB413.16Unprotected areas and fire resistance – portal framesB413.22Methods for calculating acceptable unprotected area – sprinkler systemsB517.8Location of firefighting shaftsB518.11Provision of smoke outlets – mechanical smoke extractONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 163EEEDesign of sprinkler systems E3 Where required, sprinkler systems should be provided throughout the building or separated part, unless acting as a compensatory feature to address a specific risk. They should be designed and installed in accordance with the following.a. For residential buildings, the requirements of BS 9251. b. For non-residential buildings, or residential buildings outside the scope of BS 9251, the requirements of BS EN 12845, including the relevant hazard classification together with additional measures to improve system reliability and availability as described in Annex F of the standard.NOTE: Any sprinkler system installed to satisfy the requirements of Part B of the Building Regulations should be provided with additional measures to improve system reliability and availability and is therefore to be regarded as a life safety system. However, there may be some circumstances in which additional measures to improve system reliability and availability specified in Annex F of BS EN 12845 are inappropriate or unnecessary.E4 If the provisions in a building vary from those in this document, sprinkler protection can also sometimes be used as a compensatory feature.BS 9251 makes additional recommendations when sprinklers are proposed as compensatory features.Water supplies and pumpsE5 For non-residential sprinkler systems designed and installed to BS EN 12845, water supplies should consist of either of the following.a. Two single water supplies complying with clause 9.6.1, independent of each other.b. Two stored water supplies meeting all of the following conditions.i. Gravity or suction tanks should satisfy all the requirements of clause 9.6.2(b), other than capacity.ii. Any pump arrangements should comply with clause 10.2.iii. In addition to meeting the requirements for inflow, either of the following should apply.• The capacity of each tank should be at least half the specified minimum water volume of a single full capacity tank, appropriate to the hazard.• One tank should be at least equivalent to half the specified water volume of a single full capacity tank, and the other shall not be less than the minimum volume of a reduced capacity tank (see clause 9.3.4) appropriate to the hazard.The total capacity of the water supply in (iii), including any inflow for a reduced capacity tank, should be at least that of a single full holding capacity tank that complies with Table 9, Table 10 or clause 9.3.2.3, as appropriate to the hazard and pipework design.E6 For the systems described in paragraph E5, both of the following apply if pumps are used to draw water from two tanks.a. Each pump should be able to draw water from either tank.b. Any one pump, or either tank, should be able to be isolated.The sprinkler water supplies should not be used as connections for other services or other fixed firefighting systems.ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION164 Approved Document B Volume 2, 2019 edition Building Regulations 2010FFAppendix F: Standards referred toEuropean StandardsNOTE: All the British and European Standards can be purchased at the following address: https://shop.bsigroup.com/. Alternatively access to the British and European Standards may be gained at public reference libraries. BS EN 54 Fire detection and fire alarm systems BS EN 54-7 Smoke detectors. Point smoke detectors that operate using scattered light, transmitted light or ionization [2018] BS EN 54-11 Manual call points [2001] BS EN 81 Safety rules for the construction and installation of lifts BS EN 81-20 Lifts for the transport of persons and goods. Passenger and goods passenger lifts [2014]BS EN 81-58 Examination and tests. Landing doors fire resistance test [2018]BS EN 81-72 Particular applications for passenger and goods passenger lifts. Firefighters lifts [2015] BS EN ISO 306 Plastics. Thermoplastic materials. Determination of Vicat softening temperature (VST) [2013] BS EN 520 Gypsum plasterboards. Definitions, requirements and test methods [2004 + A1 2009] BS EN 1125 Building hardware. Panic exit devices operated by a horizontal bar, for use on escape routes. Requirements and test methods [2008]BS EN 1155 Building hardware. Electrically powered hold-open devices for swing doors. Requirements and test methods [1997]BS EN 1366 Fire resistance tests for service installations BS EN 1366-2 Fire dampers [2015] BS EN 1366-8 Smoke extraction ducts [2004]BS EN 1634 Fire resistance and smoke control tests for door and shutter assemblies, openable windows and elements of building hardware BS EN 1634-1 Fire resistance test for door and shutter assemblies and openable windows [2014 + A1 2018] BS EN 1634-2 Fire resistance characterisation test for elements of building hardware [2008] BS EN 1634-3 Smoke control test for door and shutter assemblies [2004] BS EN 1993-1-2 Eurocode 3. Design of steel structures. General rules. Structural fire design [2005]BS ISO 3864-1 Graphical symbols. Safety colours and safety signs. Design principles for safety signs and safety markings [2011]BS EN 12101 Smoke and heat control systems BS EN 12101-2 Natural smoke and heat exhaust ventilators [2017]BS EN 12101-3 Specification for powered smoke and heat control ventilators (Fans) [2015]BS EN 12101-6 Specification for pressure differential systems. Kits [2005] BS EN 12845 Fixed firefighting systems. Automatic sprinkler systems. Design, installation and maintenance [2015] BS EN 13238 Reaction to fire tests for building products. Conditioning procedures and general rules for selection of substrates [2010] BS EN 13501 Fire classification of construction products and building elements BS EN 13501-1 Classification using data from reaction to fire tests [2018] BS EN 13501-2 Classification using data from fire resistance tests, excluding ventilation services [2016] ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 165FFFBS EN 13501-3 Classification using data from fire resistance tests on products and elements used in building service installations: fire resisting ducts and fire dampers [2005 + A1 2009] BS EN 13501-4 Classification using data from fire resistance tests on components of smoke control systems [2016] BS EN 13501-5 Classification using data from external fire exposure to roof tests [2016] BS EN 14306 Thermal insulation products for building equipment and industrial installations. Factory made calcium silicate (CS) products. Specification [2015] BS EN 14604 Smoke alarm devices [2005] BS EN 15102 Decorative wall coverings. Roll and panel form [2007 + A1 2011] BS EN 15650 Ventilation for buildings. Fire dampers [2010] BS EN 15725 Extended application reports on the fire performance of construction products and building elements [2010]BS EN 50200 Method of test for resistance to fire of unprotected small cables for use in emergency circuits [2015] British StandardsBS 476 Fire tests on building materials and structures BS 476-3 Classification and method of test for external fire exposure to roofs [2004] BS 476-6 Method of test for fire propagation for products [1989 + A1 2009] BS 476-7 Method of test to determine the classification of the surface spread of flame of products [1997] BS 476-8 Test methods and criteria for the fire resistance of elements of building construction [1972] BS 476-11 Method for assessing the heat emission from building materials [1982] BS 476-20 Method for determination of the fire resistance of elements of construction (general principles) [1987]BS 476-21 Methods for determination of the fire resistance of loadbearing elements of construction [1987]BS 476-22 Methods for determination of the fire resistance of non-loadbearing elements of construction [1987] BS 476-23 Methods for determination of the contribution of components to the fire resistance of a structure [1987] BS 476-24 Method for determination of the fire resistance of ventilation ducts [1987] BS 476-31.1 Methods for measuring smoke penetration through doorsets and shutter assemblies. Method of measurement under ambient temperature conditions [1983] BS 2782-0 Methods of testing. Plastics. Introduction [2011] BS 3251 Specification. Indicator plates for fire hydrants and emergency water supplies [1976] BS 4422 Fire. Vocabulary [2005]BS 4514 Unplasticized PVC soil and ventilating pipes of 82.4mm minimum mean outside diameter, and fittings and accessories of 82.4mm and of other sizes. Specification [2001] ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION166 Approved Document B Volume 2, 2019 edition Building Regulations 2010FFBS 5255 Specification for thermoplastics waste pipe and fittings [1989] BS 5266-1 Emergency lighting. Code of practice for the emergency lighting of premises [2016] BS 5395-2 Stairs, ladders and walkways. Code of practice for the design of helical and spiral stairs [1984]BS 5438 Methods of test for flammability of textile fabrics when subjected to a small igniting flame applied to the face or bottom edge of vertically oriented specimens [1989] BS 5446-2 Fire detection and fire alarm devices for dwellings. Specification for heat alarms [2003] BS 5499 Graphical symbols and signs BS 5499-4 Safety signs. Code of practice for escape route signing [2013]BS 5499-5 Safety signs, including fire safety signs. Signs with specific safety meanings [2002] BS 5839 Fire detection and fire alarm systems for buildings BS 5839-1 Code of practice for system design, installation, commissioning and maintenance of systems in non-domestic premises [2017]BS 5839-2 Specification for manual call points [1983] BS 5839-3 Specification for automatic release mechanisms for certain fire protection equipment [1988] BS 5839-6 Code of practice for the design, installation, commissioning and maintenance of fire detection and fire alarm systems in domestic premises [2019] BS 5839-8 Code of practice for the design, installation, commissioning and maintenance of voice alarm systems [2013]BS 5839-9 Code of practice for the design, installation, commissioning and maintenance of emergency voice communication systems [2011]BS 5867-2 Fabrics for curtains and drapes. Flammability requirements. Specification [2008] BS 5906 Waste management in buildings. Code of practice [2005] BS 7157 Method of test for ignitability of fabrics used in the construction of large tented structures [1989] BS 7273 Code of practice for the operation of fire protection measuresBS 7273-4 Actuation of release mechanisms for doors [2015]BS 7346-7 Components for smoke and heat control systems. Code of practice on functional recommendations and calculation methods for smoke and heat control systems for covered car parks [2013]BS 7974 Application of fire safety engineering principles to the design of buildings. Code of practice [2019]BS 8214 Timber-based fire door assemblies. Code of practice [2016] BS 8313 Code of practice for accommodation of building services in ducts [1997]BS 8414 Fire performance of external cladding systemsBS 8414-1 Test method for non-loadbearing external cladding systems applied to the masonry face of a building [2015 + A1 2017]BS 8414-2 Test method for non-loadbearing external cladding systems fixed to and supported by a structural steel frame [2015 + A1 2017]BS 8519 Selection and installation of fire-resistant power and control cable systems for life safety and fire-fighting applications. Code of practice [2010] BS 9251 Fire sprinkler systems for domestic and residential occupancies. Code of practice [2014]BS 9252 Components for residential sprinkler systems. Specification and test methods for residential sprinklers [2011]BS 9990 Non automatic fire-fighting systems in buildings. Code of practice [2015]BS 9991 Fire safety in the design, management and use of residential buildings. Code of practice [2015] BS 9999 Fire safety in the design, management and use of buildings. Code of practice [2017]ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 167GFGAppendix G: Documents referred toLegislation(available via www.legislation.gov.uk)Education Act 1996Gas Safety (Installation and Use) Regulations 1998 (SI 1998/2451)Lifts Regulations 1997 (SI 1997/831)Pipelines Safety Regulations 1996 (SI 1996/825)Prison Act 1952Safety of Sports Grounds Act 1975Regulatory Reform (Fire Safety) Order 2005 (SI 2005/1541)Commission Decision 2000/367/EC of 3 May 2000 implementing Council Directive 89/106/EECCommission Decision 2000/553/EC of 6 September 2000 implementing Council Directive 89/106/EECEuropean Parliament and Council Directive 95/16/EC Other documentsPublicationsAssociation for Specialist Fire Protection (ASFP)(www.asfp.org.uk)ASFP Red Book – Fire-Stopping: Linear Joint Seals, Penetration Seals and Cavity Barriers, Fourth Edition ASFP Grey Book – Volume 1: Fire Dampers (European Standards), Second EditionASFP Blue Book British Standard version – Fire Resisting Ductwork, Tested to BS 476 Part 24, Third Edition ASFP Blue Book European version – Fire Resisting Ductwork, Classified to BS EN 13501 Parts 3 and 4, First Edition Ensuring Best Practice for Passive Fire Protection in Buildings, Second Edition [2014]Building Research Establishment Limited (BRE)(www.bre.co.uk)BRE report (BR 135) Fire Performance of External Thermal Insulation for Walls of Multi-storey Buildings, Third Edition [2013]BRE report (BR 187) External Fire Spread: Building Separation and Boundary Distances, Second Edition [2014] BRE Digest 208 Increasing the Fire Resistance of Existing Timber Floors [1988] BRE report (BR 274) Fire Safety of PTFE-based Materials Used in Buildings [1994] ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION168 Approved Document B Volume 2, 2019 edition Building Regulations 2010GGDepartment for Communities and Local Government(www.gov.uk/government/publications/fire-performance-of-green-roofs-and-walls) Fire Performance of Green Roofs and Walls [2013]Department for Education(www.dfes.gov.uk) Building Bulletin (BB) 100: Design for Fire Safety in Schools [2007] Department of Health(www.dh.gov.uk) Health Technical Memorandum (HTM) 05-02: Firecode. Guidance in Support of Functional Provisions (Fire Safety in the Design of Healthcare Premises) [2015]HTM 88: Guide to Fire Precautions in NHS Housing in the Community for Mentally Handicapped (or Mentally Ill) PeopleDoor and Hardware Federation (DHF) and Guild of Architectural Ironmongers (GAI)(www.firecode.org.uk) Hardware for Fire and Escape Doors [2012] Door and Shutter Manufacturers’ Association (DSMA) (www.dhfonline.org.uk) Code of Practice for Fire Resisting Metal Doorsets [2010] Fire Protection Association (FPA)(www.thefpa.co.uk) RISCAuthority Design Guide for the Fire Protection of Buildings [2005] Football Licensing Authority(www.flaweb.org.uk/home.php) Concourses [2006] Glass and Glazing Federation (GGF)(www.ggf.org.uk) A Guide to Best Practice in the Specification and Use of Fire-resistant Glazed Systems [2011] Health and Safety Executive (HSE)(www.hse.gov.uk)Safety Signs and Signals: The Health and Safety Regulations 1996. Guidance on Regulations, L64 [2015]HM Prison and Probation Service (HMPPS) (www.hmppsintranet.org.uk/uploads/HMPPSFireSafetyDesignGuide.pdf)Custodial Premises Fire Safety Design Guide Passive Fire Protection Forum (PFPF)(https://asfp.org.uk/page/Publicationslist)Guide to Undertaking Technical Assessments of the Fire Performance of Construction Products Based on the Fire Test Evidence [2021] Sports Grounds Safety Authority (https://sgsa.org.uk/)Guide to Safety at Sports Grounds [2007]Steel Construction Institute (SCI)(https://steel-sci.com) SCI Publication P288 Fire Safe Design: A New Approach to Multi-storey Steel-framed Buildings, Second Edition [2006] SCI Publication P313 Single Storey Steel Framed Buildings in Fire Boundary Conditions [2002]Timber Research and Development Associations (TRADA)(www.trada.co.uk) Timber Fire Resisting Doorsets: Maintaining Performance under the New European Test Standard [2002] ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 169GIndexAAccess controlEffect on escape routes 2.8Access for fire serviceSee Fire service facilitiesAccessibility 0.8See also Disabled peopleAccess roomsDefinition Appendix AMeans of escape from inner rooms 2.11, Diagram 2.3AccreditationInstallers page iii, 1.16, Appendix B5Air changesSee VentilationAir conditioning 10.6–10.11See also VentilationAir exhaust terminals 10.6Air supported structures 6.9AislesFixed seating 5.19Alarm systemsSee Fire detection and alarm systems; Voice alarm systemsAlternative approaches 0.9–0.19Alternative escape routesDefinition Appendix AHorizontal escape 2.3–2.5, 2.10, Diagram 2.2Small premises 4.6Sub-division of corridors 2.26–2.27, 9.6Vertical escape 3.3Alternative exits 2.3–2.5Definition Appendix ADivided corridors Table C1Fire doors Table C1Amusement arcadesFloor space factors Table D1Ancillary accommodationCompartmentation 8.12Escape routes 2.38, 2.44Fire resisting construction Table B3Residential care homes 2.44, Table C1Shop and commercial purpose group 0.21Appliance ventilation ductsDefinition Appendix AOpenings in compartment walls or floors 8.31, 10.23Approved documents page iArchitravesDefinition of walls and ceilings 6.3, 6.6Area measurement Diagram D3Art galleriesFloor space factors Table D1Artificial lightingSee Escape lightingAssembly and recreation purpose group 0.13Compartmentation 8.11Counting number of storeys Diagram D5Escape routesDoor fastenings 5.9Escape lighting Table 5.1External escape stairs 3.31, 3.32Minimum width of escape stairs 3.16, Table 3.1Single escape routes 2.6External walls 13.1Fire doors Table C1Firefighting shafts 17.6Fire resistance of external walls Table 12.1Fixed seating spacing 2.20Floor space factors Table D1Junction of compartment wall with roof 8.27Maximum dimensions of building or compartment Table 8.1Means of escapeSimultaneous evacuation 3.16Travel distance limitations Table 2.1Minimum periods of fire resistance Table B4Purpose groups Table 0.1Space separation 13.1Acceptable unprotected areas 13.20Notional boundaries 13.5Small buildings or compartments Table 13.1Sprinkler systems 8.14AtriaCompartmentation 8.13, 8.31Definition Appendix AFire safety measures 0.16Lift installations 5.36Space separation 13.23ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION170 Approved Document B Volume 2, 2019 edition Building Regulations 2010AuditoriaSee Assembly and recreation purpose groupAutomated storage systemsSee Storage and other non-residentialAutomatic doorsClosing methods Appendix C6Escape routes 5.15See also Automatic release mechanisms; Self-closing devicesAutomatic fire dampersSee Fire dampersAutomatic fire detection and alarm systems See Fire detection and alarm systemsAutomatic release mechanismsAutomatic fire detection 1.6Definition Appendix AFire and smoke dampers 10.21Fire safety signs Appendix C11Self-closing fire doors 2.15, Appendix C6See also Self-closing devicesBBalconies 12.11 BarsFloor space factors Table D1Basement storeysCar parks 18.15Compartmentation 8.11Counting number of storeys Diagram D5Definition Appendix AEscape stairs 3.12, 3.24, 3.40–3.41Added protection 3.34Capacity of stairs Table 3.2Single escape stairs 3.3Firefighting shafts 17.2–17.3, Diagram 17.2Fire resistance Appendix B27Elements of structure 7.2, Table B4Lift installations 5.38, 5.40Means of escapeEscape routes clear of smoke vents 18.10Final exits clear of smoke vents 5.24Simultaneous evacuation 3.16Underground accommodation escape lighting Table 5.1Venting of heat and smoke 18.1–18.15BeamsFire resistance 7.1, 8.24, Table B3Timber, in compartment walls 8.16Bedroom corridorsLimitations on travel distance Table 2.1Uninsulated glazed elements on escape routes Table B5BedroomsFloor space factors Table D1Hotels door locks 5.7Inner rooms 2.11Limitations on travel distance Table 2.1Partitions and provision of cavity barriers 9.7, 9.18Residential care homes 2.42–2.43, 2.45–2.46, Diagram 2.11See also DormitoriesBed‑sitting roomsFloor space factors Table D1Betting officesFloor space factors Table D1Billiard roomsFloor space factors Table D1Bingo hallsFloor space factors Table D1Boiler roomsLocation of final exits 5.24See also Plant roomsBoltsSee FasteningsBoundaries 13.4–13.5Definition Appendix ASee also Notional boundaries; Relevant boundaries; Separation distancesBridgesFire service vehicle access route specification Table 15.2British Standards Appendix FBS 476-3 Table B2BS 476-6 Table B1BS 476-7 Appendix B13, Table B1BS 476-11 Table B1BS 476-20 to 24 Table B3BS 476-22 Appendix C1, Table C1BS 476-31.1 Table C1BS 2782-0 Appendix B13BS 3251 16.10BS 4514 10.5BS 5255 10.5BS 5266-1 5.27, 5.31BS 5395-2 3.27BS 5438 Appendix B13ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 171BS 5499-4 5.28BS 5499-5 Appendix C11BS 5839-1 1.7–1.10, 1.12, 1.15, 2.41, 3.21, 5.31, 7.7, 9.12, 10.22, 18.12BS 5839-2 1.10BS 5839-3 10.21BS 5839-8 1.11, 3.21BS 5839-9 3.7BS 5867-2 Appendix B13BS 5906 5.42BS 7157 6.9BS 7273 1.17BS 7273-4 5.8BS 7346-7 11.5BS 7974 0.19BS 8214 Appendix C14BS 8313 8.38BS 8414-1 12.3BS 8414-2 12.3BS 8519 5.31BS 9251 Appendix E3, Appendix E4BS 9990 16.5, 16.11BS 9999 0.12, 0.13, 0.16, 1.14, 2.20, 3.16, 5.19, 5.32, 8.13, 8.31, 9.12, 13.23, 17.9, 17.11, 19.5, Table 3.1BS EN 54-7 10.21BS EN 54-11 1.10BS EN 81-20 17.11BS EN 81-58 Appendix C1BS EN 81-72 17.11BS EN 520 Appendix B9BS EN 1125 5.9BS EN 1155 2.45BS EN 1366-8 11.5BS EN 1634-1 Appendix C1, Appendix C4BS EN 1634-2 Appendix C1BS EN 1634-3 Appendix C1, Table C1BS EN 1993-1-2 Table B4BS EN 12101-2 Appendix D5BS EN 12101-3 11.5, 18.12BS EN 12101-6 2.28, 3.15, Table C1BS EN 12845 Appendix E3, Appendix E5BS EN 13238 Appendix B8BS EN 13501-1 page 91, Appendix B6, Appendix B10, Table B1BS EN 13501-2 Appendix B22, Appendix B25, Appendix C1, Table B3, Table C1BS EN 13501-3 Appendix B22, Appendix B25, Table B3BS EN 13501-4 Appendix B22, Appendix B25, Table B3BS EN 13501-5 Appendix B16 to B18, Table B2BS EN 14306 Appendix B9BS EN 15102 Table 6.1BS EN 15650 10.19–10.20BS EN 15725 Appendix B4BS EN 50200 5.30BS EN ISO 306 Appendix B11BS ISO 3864-1 5.28BuildingDefinition Appendix ABuilding control body page iiDefinition Appendix ABuilding dimensionsMeasurement methods Diagrams D2 to D6Building footprintSee Perimeter of buildingBuilding Regulations 2010 pages i–iiBuildings of architectural or historical interest 0.17Building work page iiFire safety information 19.1BulkheadsSmoke outlet shafts and ducts 18.13CCablesSee Electrical wiringCanopies Diagram 13.6Space separation 13.13–13.14CapacitySee Occupant capacityCare homesSee Residential care homesCar parksEnclosedLift installations 5.38Ventilation 11.3–11.5Escape lighting Table 5.1Extract ductwork 10.10Fire resisting construction 11.2Floor space factors Table D1Internal fire spread 11.1–11.5Maximum dimensions of building or compartment Table 8.1Minimum periods of fire resistance Table B4Open-sidedONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION172 Approved Document B Volume 2, 2019 edition Building Regulations 2010Height of building or compartment 13.21Space separation Table 13.1Ventilation 11.2Recessed areas Diagram A1Smoke venting from basement 18.15Cavities 9.1–9.18Cavity walls excluded from provisions for cavity barriers Diagram 9.2Definition Appendix AFire resisting ceilings 6.7, 9.10, Diagram 9.3Maximum dimensions 9.9–9.11, Table 9.1See also Cavity barriers; Cavity wallsCavity barriersCavity walls excluded Diagram 9.2Construction and fixings 9.13–9.16Definition Appendix ADouble-skinned insulated roof sheeting Diagram 9.4External walls 12.9–12.10Fire doors Table C1Fire resistance Table B3Floor or roof cavities 6.7, 9.9–9.11Junctions with compartment floors and walls 9.3Materials 9.14Maximum dimensions 9.9–9.11Openings 9.14Provision 9.2, Diagram 9.1Sub-division of corridors 2.27, Diagram 2.9Cavity wallsExcluded from provisions for cavity barriers Diagram 9.2Junctions with compartment floors and walls 9.3See also Insulation (thermal)CeilingsCavities 9.10–9.11, Diagram 9.3Definition 6.5, Appendix AEnclosure of corridors by partitions 2.25Fire resistance Table B3Fire resisting 6.7, 9.10, Diagram 9.3Lighting diffusers that form part of 6.16–6.17, Diagram 6.1Linings 6.5–6.6Stretched skin 6.18Sub-division of corridors 2.27Surfaces exposed 6.17See also Suspended ceilingsCentral coresSee ExitsCentral handrailsWidth of escape stairs 3.10–3.11CertificationFire detection and alarm systems 1.16Installers page iiiChange of useFire safety information 19.1Material change of use 12.18ChimneysOpenings in compartment walls or floors 8.31ChutesSee Refuse chutesCirculation spacesDefinition Appendix AGlazing external windows with thermoplastic materials 6.14Separating circulation routes from stairways 2.15Wall and ceiling linings Table 6.1See also Corridors; Lobbies; StairsCladdingCavities 9.10External wall construction 12.6–12.7, 12.12–12.13, 12.22, Table 12.1Cavity barriers 12.9–12.10CloakroomsProtected stairways 3.38ClubsFloor space factors Table D1Codes of practice Appendix GCollapseResistance to Appendix B19See also IntegrityColumnsFire resistance 7.1, Table B3Portal frames 13.16Combustibility of external surface materials 12.3–12.22Unprotected area 13.7, Diagram 13.4CommercialSee Shop and commercial purpose groupCommittee roomsFloor space factors Table D1Common corridorsStoreys divided into different occupancies 2.17Common escape routesMixed use buildings 3.2See also Common corridorsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 173Common loadbearing elementsSee Elements of structureCommon roomsFloor space factors Table D1Communication systemsEmergency voice communication (EVC) for evacuation from refuges 3.7Phased evacuation 3.21Voice alarm systems 1.11, 3.21Compartmentation 8.1–8.39, Diagram 8.1Acceptable unprotected area 13.20, Table 13.1Basements 8.11Smoke venting 18.2Definition Appendix AMaximum dimensions Table 8.1Measuring areas Diagram D3Progressive horizontal evacuation 2.35–2.36Protection of lift installations 5.35Space separation 13.3Steel framed buildings 8.24Compartment floorsConstruction 8.15–8.29, Diagram 8.1Junction with walls 8.22–8.24Openings 8.31Definition Appendix AFire doors in Table C1Fire resistance Table B3Flues and ducts passing through 10.23, Diagram 10.4Nominal internal diameter of pipes passing through Table 10.1Phased evacuation 3.21Provision 8.2–8.3, Diagram 8.1Compartment walls Diagram 8.1Between buildings 8.18Construction 8.15–8.29Junction with other walls 8.22–8.24Junction with roof 8.25–8.29, Diagram 8.2Openings 8.30–8.31Definition Appendix AFire doors in Table C1Fire resistance Table B3Flues and ducts passing through 10.23, Diagram 10.4Maximum door openings Appendix C8Nominal internal diameter of pipes passing through Table 10.1Provision 8.2–8.3Refuges Diagram 3.1Unsuitability of cavity barriers 9.4Compliance page iConcealed spacesSee Cavities ConcoursesFloor space factors Table D1Conduits for cablesOpenings passing through a separating element 9.17, 10.24Conference roomsFloor space factors Table D1ConservatoriesMeasuring floor area Diagram D3Plastic rooflights Tables 14.2 to 14.3Control roomsEscape lighting Table 5.1Cooking facilitiesSee KitchensCorridors 2.24–2.28Door opening 5.13Escape lighting Table 5.1Fire doors Table C1Glazed screen to protected shafts 8.34, Diagram 8.4Subdivision 2.26–2.27Cavity barriers Diagram 2.9Dead ends 2.28, Diagram 2.10Vision panels in doors 5.14See also Bedroom corridors; Common corridors; Protected corridorsCover mouldsDefinition of walls and ceilings 6.3, 6.6Crush hallsFloor space factors Table D1Cubic capacityMeasurement Diagram D2CupboardsProtected stairways 3.38DDance floors/hallsFloor space factors Table D1Dead endsCorridors 2.24, 2.28, Diagram 2.10Fire doors Table C1Definition Appendix AFire service vehicle access route 15.10, Diagram 15.3Travel distance Diagram 2.1ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION174 Approved Document B Volume 2, 2019 edition Building Regulations 2010Uninsulated glazed elements on escape routes Table B5Different occupancies/usesSee Mixed use; Separate occupancies/usesDining roomsFloor space factors Table D1Direct distancesDefinition Appendix ALimitations on travel distance Table 2.1Disabled peopleInclusive design 0.8Means of escapeEvacuation lifts 5.33Final exits 5.22Phased evacuation 3.21Ramps and sloping floors 5.18–5.19Refuges for wheelchair users 3.4–3.8, Diagrams 3.1 to 3.2Travel distance limitations Table 2.1Vision panels in doors 5.14Warnings for hearing impaired people 1.15See also Residential care homesDiscounting of stairs 3.14–3.15Added protection 3.34Tall buildings 3.20Discounting of storey exits 2.21Doors and doorwaysAmount of opening 5.12Dead end corridors Diagram 2.10Definition of walls and ceilings 6.3, 6.6Direction of opening 5.11Escape routes 5.6–5.15External escape stairs 3.32Headroom 5.16Pressurised 2.28Exit signs 5.28Fastenings 5.7–5.10Fire resistance 5.3, 5.5Fire service access 15.3Openings in cavity barriers 9.14Openings in compartment walls or floors 8.30Openings in enclosure to protected shaft 8.39Separation of circulation routes from stairways 2.15Subdivision of corridors 2.26Vision panels 5.14Width measurement Appendix D4, Diagram D1See also Automatic doors; Fire doorsetsDormitoriesFloor space factors Table D1Regulation 7 (building materials) 12.15Double‑skinned insulated roof sheetingCavity barriers 9.8, Diagram 9.4Junction of compartment wall with roof 8.28, Diagram 8.2Drainage pipesEnclosed Table B3Maximum nominal internal diameter 10.4, Table 10.1Dry mainsSee Fire mainsDuctsFire resistance Table B3OpeningsIn cavity barriers 9.17In compartment walls or floors 8.31, 10.23Protection 10.6–10.11, 10.24Protected shafts 8.33Smoke vents 18.13See also Flues; Ventilation ductsDwellingsDefinition Appendix ASee also Residential (other) purpose group; Residential use EEavesRoof measurements Diagram D3Educational buildings 0.14Electrical circuitsSee Protected power circuitsElectrically powered locks 5.8Electrical wiringCavities 9.12Openings for 9.17, 10.24Protected circuits 5.29–5.30See also Power supplyElectricity generator roomsEscape lighting Table 5.1See also Plant roomsElements of structureDefinition Appendix AFire resistance 7.1–7.5, Appendix B26, Table B3Part of more than one building or compartment Appendix B26Standards Appendix B22ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 175Emergency control roomsEscape lighting Table 5.1Emergency lightingDefinition Appendix ASee also Escape lightingEmergency voice communication (EVC) 3.7Enclosed car parksSee Car parksEnclosureCorridorsNot protected corridors 2.25Sub-division 2.27, Diagram 2.9Escape stairs 3.23Fire resistance 5.2, Table B3See also Fire resisting construction; Protected escape routesEnergy efficiency requirements page iiEnquiry officesProtected stairways 3.38EscalatorsEscape routes in open spatial planning 2.13Protected shafts 8.32Escape lighting 5.25–5.27, Table 5.1Definition Appendix AEscape routesClear of building 5.21Definition Appendix ADoors on 5.6–5.15Fire doors Table C1Floors 5.17–5.19Headroom 5.16Helical stairs, spiral stairs and fixed ladders 3.27Lifts prejudicing 5.34Number 2.3–2.5, 2.9, Table 2.2Single escape route acceptability 2.6–2.7Small premises 2.6, 4.6Ramps and sloping floors 5.18–5.19Single steps 3.26Siting refuse storage chambers 5.45Siting smoke vents 18.10Small premises 4.6Uninsulated glazed elements on Table B5Ventilation 3.35Width 2.18–2.20Relative to final exit 5.20Width measurement Appendix D4See also Alternative escape routes; Horizontal escape; Protected escape routes; Vertical escapeEscape stairs 3.40–3.41Added protection for phased evacuation 3.34Basement storeys 3.40–3.41, Table 3.2Construction 3.24–3.25Discounting of stairs 3.14–3.15Door opening onto 5.13Fire resisting construction 3.24Helical and spiral 3.27Lighting 5.25–5.27, Table 5.1Minimum width 3.10–3.13, Tables 3.1 to 3.2Number 3.2–3.3Phased evacuation 3.22, 3.34Capacity Table 3.3Simultaneous evacuationCapacity 3.16–3.17, Table 3.2Unprotected 3.23See also External escape stairs; Protected stairwaysEuropean Standards Appendix FSee also British Standards BS ENEvacuationResidential care homes 2.34Simultaneous 1.13, 3.16–3.17See also Escape routes; Phased evacuation; Progressive horizontal evacuationEvacuation lifts 5.32–5.33Definition Appendix AFor disabled people 5.33Identification 3.8Protected lobbies 3.21Exhaust terminalsMechanical ventilation and air conditioning systems 10.6Exhibition hallsFloor space factors Table D1Existing buildingsBuilding work page iiSee also Buildings of architectural or historical interestExit passagewaysDefinition Appendix AExitsCentral core 2.12, Diagram 2.4Discounting of exits 2.21ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION176 Approved Document B Volume 2, 2019 edition Building Regulations 2010Width 2.18–2.20, Table 2.3See also Alternative exits; Final exits; Storey exitsExit signs 5.28External escape 2.30–2.32Escape over flat roofs 2.31–2.32Fire resistance of adjacent wall 2.30External escape stairs 3.31–3.33Escape over flat roofs 3.33Fire resistance of adjacent areas Diagram 3.4Fire resisting construction 3.32External fire spreadBetween buildings 13.1–13.23Over external walls 12.1–12.22Requirement B4 page 91, 12.21Roof coverings 14.1–14.9See also Separation distancesExternal stairsSee External escape stairsExternal wallsAdjacent to protected stairways 3.29–3.30Cavities 9.10Combustibility 12.3–12.22Construction 12.1–12.22Definition Appendix AExternal escape stairs 3.30, Diagram 3.4External surfaces 12.5Facing a boundary 13.4–13.5Fire resistance 12.2, Table 12.1, Table B3Green walls 12.8Metal composite materials 12.12–12.13 Protected shafts 8.39Protected stairways 3.29–3.30, Diagram 3.3Regulation 7 (building materials) 12.14–12.17Solar shading devices 12.19–12.20 Specified attachments 12.15–12.22Unprotected areas 13.6–13.23, Diagram 13.4Extract ductworkKitchens 10.10, 10.14FFactoriesSee Industrial purpose groupFasteningsDoors on escape routes 5.7–5.10Feature liftsFire protection of lift installations 5.36Final exits 5.20–5.24Clear of exhaust points 10.6Definition Appendix AMerging flows Diagram 2.6Protected stairways 3.37Siting access to refuse storage chambers 5.45Width 2.23, 5.20See also Alternative exitsFire and smoke dampersDefinition Appendix AInstallation and specification 10.17–10.22Ventilation ducts 10.8, 10.12, 10.16Fire alarm systemsDefinition Appendix ASee also Fire detection and alarm systemsFire dampersDefinition Appendix AInstallation and specification 10.17–10.22Openings in cavity barriers 9.17Ventilation ducts 10.12–10.16Fire detection and alarm systems 1.3–1.17Automatic fire detection and alarm systems 1.4–1.6Activation of air extraction system 18.12Activation of fire dampers 10.21Automatic operation of smoke vents 10.9Inner rooms 2.11Maximum dimensions of cavities 9.12Mechanical ventilation and air conditioning systems 10.9Raised storage areas 7.7Storeys divided into different occupancies 2.17Store rooms 5.46Call points 1.10Categories 1.9Design and installation 1.16–1.17Interface with other systems 1.17Phased evacuation 1.13, 3.21Provision 1.1–1.2Requirement B1 page 8Residential care homes 2.41Staged alarm systems 1.13Student accommodation 1.18 See also Voice alarm systemsFire doorsets Table C1Automatic closing methods Appendix C6Definition Appendix ADivided corridors 2.26Hinges Appendix C10ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 177Firefighting lifts 17.2–17.3, 17.11Approach through firefighting lobby 17.9Components of firefighting shaft Diagram 17.1Definition Appendix AFirefighting lobbiesApproach to firefighting stair or lift 17.9Components of firefighting shaft Diagram 17.1Definition Appendix AFirefighting facilities 17.1Outlets from fire mains 16.4Firefighting shaftsComponents Diagram 17.1Definition Appendix ADesign and construction 17.9–17.11Fire mains provision 16.2, 16.4, 17.10Fire resistance Table B3External walls 8.39Protected stairways 3.23Provision Diagram 17.2Location 17.7–17.8, Diagram 17.3Number 17.2–17.6Services passing through 17.9Firefighting stairsAccess lobbies and corridors 3.34Approach through firefighting lobby 17.9Components of firefighting shaft Diagram 17.1Definition Appendix AFire mains outlets 16.4Fire resisting construction 3.24Use as escape stairs 3.20, 3.24Fire hydrants 16.8–16.11Fire mains 16.1–16.7Firefighting shafts 16.2, 16.4, 17.10, Diagram 17.1Implications for fire vehicle access 15.4–15.6Maximum hose distance 16.3, 17.8Private hydrants 16.8–16.11Fire penetrationResistance to Appendix B19Fire performanceClassification and testing Appendix B1 to B10, Table C1Minimum periods of fire resistance by purpose group Table B4Reaction to fire Appendix B6 to B10Roofs Appendix B15 to B18, Table B2Fireplace surroundsDefinition of walls 6.3Fire resistance Appendix B19 to B25Definition Appendix ADiscounting radiation through external walls 13.1Elements of structure 7.1–7.5, Appendix B22, Appendix B26Tests by element Table B3External walls 12.1–12.13, Table 12.1Minimum periods by building type Table B4Fire resisting construction 7.1–7.5Alternative escape routes 3.32Ceilings 6.7, 9.10, Diagram 9.3Cavities 6.7, 9.10, Diagram 9.3Separation of bedrooms 9.7Compartmentation 8.4, 8.15Corridors 2.25Sub-division 2.27, Diagram 2.9Cupboards 3.38Definition Appendix AExternal escape stairs 3.32, Diagram 3.4Fire resistance Table B3Flat roof forming an escape route 2.32Lift installations 5.34Places of special fire hazard 8.7, 8.12Protected escape routes Diagram 10.2Protected stairways Diagram 3.3Refuse chutes and rooms for refuse storage 5.43Shop store rooms 5.46Smoke outlet ducts and shafts 18.13–18.14, Diagram 18.1Ventilation ducts 10.12–10.13See also Cavity barriers; Compartmentation; Fire-stoppingFire safetyAlternative approaches 0.9Fire safety engineering 0.18–0.19Fire safety information 19.1–19.6Regulation 38 page 126Fire safety signsExits 5.28Fire doorsets Appendix C11Fire‑separating elementsDefinition Appendix AFire separationAdjoining protected stairways 3.37Between buildings 8.2, 8.18, 13.1–13.23See also Cavity barriers; Compartmentation; Separation distancesONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION178 Approved Document B Volume 2, 2019 edition Building Regulations 2010Fire service facilitiesAccess to buildings for firefighting personnel 17.1–17.12Building footprint and perimeter Diagram 15.1Fire mains 16.1–16.7Requirement B5 page 110Vehicle access 15.1–15.10Access routes and hardstandings 15.7–15.10, Table 15.2Buildings fitted with fire mains 15.4–15.6, 16.3, 16.6Buildings not fitted with fire mains 15.1–15.3, Table 15.1High reach fire appliance access to buildings Diagram 15.2Turning facilities 15.10, Diagram 15.3Fire severity Appendix B20–B21Fire spreadSee External fire spread; Internal fire spreadFire‑stopping 10.1, 10.24–10.29Definition Appendix AJunction of compartment wall or floor with other walls 8.22Junction of compartment wall with roof 8.25, Diagram 8.2Junction with slates, tiles, corrugated sheeting or similar 9.15Materials 10.25–10.27Pipe openings 10.4Fire suppressionSee Sprinkler systemsFire testsSee Fire performanceFitted furnitureDefinition of walls 6.3Fixed seating 5.19Spacing 2.20FixingsCavity barriers 9.16Flame spreadSee External fire spread; Internal fire spreadFlat roofsArea measurement Diagram D3Means of escape 2.31–2.32Measuring height Diagram D4Refuges 3.5Flexible membranes 6.9Floor areaMethods of measurement Diagram D3Floor levelChange in relation to door swing 5.12Single step on escape routes 3.26Sloping floors 5.18–5.19FloorsArea measurement Diagram D3Cavities 9.10Elements of structure 7.3Escape routes 5.17–5.19Fire resistance 7.1, Table B3Sloping 5.18See also Compartment floorsFloor space factors Table D1FluesFire resistance Table B3Openings for 8.31, 10.23, Diagram 10.4GGalleriesCeilings 6.5Counting storeys Diagram D5Definition Appendix AElements of structure 7.3, Appendix B26Fire resistance 7.1GangwaysFixed seating 5.19Between fixed storage racking Table 2.3GaragesSee Car parksGas appliances and metersProtected stairways 3.38, 3.39Gas service pipesProtected shafts 8.37Protected stairways 3.39Ventilation 8.38Glazed screensProtected shafts 8.34–8.35, Diagram 8.4GlazingDefinition of walls and ceilings 6.3, 6.6In door not part of wall 6.2Escape routes 5.4–5.5, Table B5External escape stairs 3.32Fire resistance of glazed elements 5.4–5.5Limitations on areas of uninsulated glazing Table B5ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 179Protected shafts 8.34Safety 5.5Thermoplastic materials 6.14, Appendix B12Unwired glass in rooflights 14.8GradientEscape routes 5.18–5.19Hardstandings Diagram 15.2Green walls 12.8Group homes for mentally impaired/mentally ill 0.11GuardingFlat roof forming escape route 2.32Route clear of the building 5.21HHabitable roomsDefinition Appendix AHandicapped peopleSee Disabled peopleHandrailsWidth of escape stairs 3.10–3.11HardstandingsFire service vehicles 15.7–15.8, Diagram 15.2HardwareFire doors Appendix C15See also FasteningsHazardSee Places of special fire hazard; RiskHeadroomEscape routes 5.16Health and safety page 110, 0.8Health care premises 0.10Compartmentation 8.8See also Residential care homes; Residential (institutional) purpose group Hearing impairment 1.15Heat alarmsSee Fire detection and alarm systemsHeat and smoke outletsSee Smoke ventsHeat radiationDiscounting 13.1HeightDefinition Appendix AMeasurement methods Diagram D4Helical stairsEscape routes 3.27High reach appliancesFire service vehicle access 15.9Access route specification Diagram 15.2, Table 15.2Buildings not fitted with fire mains Table 15.1Overhead obstructions 15.9, Diagram 15.2High riskSee Places of special fire hazardHingesFire doors Appendix C10Historic buildingsSee Buildings of architectural or historical interestHomesSee Group homes for mentally impaired/mentally ill; Residential care homes; Residential (institutional) purpose groupHorizontal escape 2.1–2.46Alternative escape routes 2.10, Diagram 2.2Exits in central core 2.12, Diagram 2.4Inner rooms 2.11, Diagram 2.3Number of escape routes and exits 2.3–2.5Minimum number 2.9, Table 2.2Single escape routes and exits 2.6–2.7Open spatial planning 2.13, Diagram 2.5Residential care homes 2.33–2.40Small premises 2.2, 4.1–4.6Storeys divided into different occupancies 2.17Storeys divided into different uses 2.16Width of escape routes and exits 2.18–2.20, Table 2.3See also Escape routesHose laying distance 16.3, 17.8, Diagram 17.3Hospitals 0.10Regulation 7 (building materials) 12.15See also Health care premisesHotelsActivation of fire and smoke dampers 10.22Bedroom doors 5.7See also Residential (other) purpose groupHydraulic liftsPipes for oil or gas in protected shafts 8.36Hydraulic platformsSee High reach appliancesONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION180 Approved Document B Volume 2, 2019 edition Building Regulations 2010IIgnition susceptibilityExternal walls 12.1Services 8.17Inclusive design 0.8See also Disabled peopleIndustrial purpose groupAncillary accommodation 8.12Compartmentation 8.11, 8.12Escape routesLighting Table 5.1Single escape stairs 3.3Travel distance limitations Table 2.1Firefighting shafts 17.6Maximum dimensions of building or compartment Table 8.1Maximum dimensions of cavities Table 9.1Minimum periods of fire resistance Table B4Purpose groups Table 0.1Space separationAcceptable unprotected area 13.20Permitted unprotected areas in small buildings or compartments Table 13.1Roofs Table 14.1Sprinkler systems 8.14See also Storage and other non-residentialInner roomsDefinition Appendix AHorizontal escape 2.11, 2.16, Diagram 2.3InstallersCertification and accreditation page iii, 1.16Institutional premisesSee Residential (institutional) purpose groupInsulating core panels 6.11Insulation performance Appendix B19, Table B3Fire doorsets Appendix C8Insulation (thermal)Between double-skinned sheeting 9.8Effect on fire performance Appendix B2External walls 12.6–12.7, 12.22Reaction to fire rating of pipe insulation 9.12IntegrityCompartment walls 8.24Fire doorsets Appendix C1, Table C1Resistance to fire penetration Appendix B19, Table B3Intercom systemPhased evacuation 3.21Internal fire spreadCar parks 11.1–11.5Linings 6.1–6.18Requirement B2 page 54Structure 7.1–7.7Requirement B3 page 61See also Cavity barriers; Compartmentation; Fire-stoppingInternal liningsClassification 6.1–6.12, Table 6.1Fire resistance Table B3Protection of substrate Appendix B14JJoistsTimber, in compartment walls 8.16JunctionsCavity barriers 9.3Compartment wall or floor with other walls 8.22–8.24Compartment wall with roof 8.25–8.29, Diagram 8.2KKeysSee Security fasteningsKitchensExtract ductwork 10.10Fire protection of lift installations 5.39Floor space factors Table D1Small premises 4.2LLaddersMeans of escape 3.28See also High reach appliancesLandingsAreas adjacent to external stairs Diagram 3.4Door opening and effect on escape routes 5.12Escape stairs 3.24, 3.32Large and complex buildingsFire safety engineering 0.18–0.19Fire safety information 19.5–19.6Protected power circuits 5.31ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 181LatchesSee FasteningsLegislation Appendix GLibrariesFloor space factors Table D1LiftsExits in central core 2.12Fire doors forming part of enclosure Table C1Fire protection of installations 5.34–5.39Lift doors Appendix C3Machine rooms 5.41Protected shafts 5.35Containing pipes 8.36Openings in enclosure 8.39Use of protected stairways 3.38Wall-climber or feature lifts 5.36See also Evacuation lifts; Firefighting liftsLightingSee Escape lightingLighting bridgesSee GalleriesLighting diffusersSuspended ceilings 6.16–6.17, Diagram 6.1, Table 6.2Thermoplastic 6.17Fire resistance Appendix B12Layout restrictions Diagrams 6.2 to 6.3Use of space below Table 6.2LiningsSee Internal liningsLive/work unitsDefinition Appendix ALoadbearing capacityDeflection of compartment walls 8.24Resistance to collapse Appendix B19, Table B3Loadbearing elements of structureSee Elements of structureLobbiesExit capacity 2.23Exits in central core 2.12Glazed screen to protected shafts 8.34, Diagram 8.4Ventilation 3.35See also Firefighting lobbies; Protected lobbiesLocksSee FasteningsLoungesFire protection of lift installations 5.39Floor space factors Table D1MMachine roomsLifts 5.41MaintenanceFire safety 0.6Main usePurpose groups 0.22MallsFire protection of lift installations 5.36Floor space factors in shopping malls Table D1Shopping complexes 0.12Management of premises 0.6Mantle shelvesDefinition of walls 6.3Materials and workmanshipCertification schemes page iiiRegulation 7 pages 91–92, 12.14–12.17Means of escapeDefinition Appendix ARequirement B1 page 8See also Escape routes; Horizontal escape; Vertical escapeMeasurementDefinition Appendix AMeasurement methods Appendix DBuilding dimensions Diagrams D2 to D6Floor space factors Table D1Occupant number Appendix D1 to D2Travel distance Appendix D3Width Appendix D4Mechanical ventilationSee VentilationMeeting roomsFloor space factors Table D1Metal composite materials 12.12–12.13 Mixed use 0.20–0.22, 0.23–0.24, 3.2Compartment walls and floors 8.3Division of storeys 2.16Interpretation of purpose groups 0.21–0.22Means of escapeEscape stairs 3.2–3.3Horizontal escape 2.5Multi‑storey buildingsCompartments 8.1–8.13Horizontal escape 2.4Maximum floor area Table 8.1See also Tall buildingsONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION182 Approved Document B Volume 2, 2019 edition Building Regulations 2010NNatural ventilationSee VentilationNon‑residential buildingsPurpose groups Table 0.1Notional boundaries 13.5, Diagram 13.3Definition Appendix AOOccupanciesSee Mixed use; Separate occupancies/usesOccupancy typeDefinition Appendix AOccupant numberHorizontal escape 2.9, 2.11, 2.19, 2.23, Table 2.2Inner rooms 2.11Residential care homes 2.39Small premises 4.2Measurement methods Appendix D1 to D2Vertical escapeWidth of escape stairs 3.13, 3.22, Tables 3.2 to 3.3OfficesCompartmentation 8.11Escape lighting Table 5.1Floor space factors Table D1Junction of compartment wall with roof 8.27Maximum dimensions of building or compartment Table 8.1Maximum dimensions of cavities Table 9.1Means of escapeFire doors Table C1Limitations on travel distance Table 2.1Single escape stairs 3.3Small premises 2.2, 4.4Minimum periods of fire resistance Table B4Over shops 0.22Purpose groups Table 0.1Space separation 13.20, Table 13.1Sprinkler systems 8.14Openable windowsSee WindowsOpening characteristicsDoors and doorways 5.11–5.13OpeningsCompartment walls or floors 8.31, 10.23, Diagram 10.4Separating buildings or occupancies 8.30Minimising 10.24Protected shafts 8.39Protecting 10.1–10.5See also Cavity barriers; Doors and doorways; Fire-stopping; WindowsOpen sided car parksSee Car parksOpen spatial planningAwareness of fires 2.25Definition Appendix AEscape lighting Table 5.1Escape routes 2.13Fire protection of lift installations 5.36Minimum width of escape stairs 3.16Other non‑residentialSee Storage and other non-residential purpose groupOutbuildingsMeasuring floor area Diagram D3Overhanging storeySee Perimeter of buildingOverhead obstructionsAccess for high reach appliances 15.9, Diagram 15.2PPanic fastenings 5.9PartitionsCavity barriers 9.14, 9.18Separation of bedrooms 9.7Enclosure of corridors 2.25Inner rooms 2.11See also WallsPavement lightsSmoke vent outlet terminal 18.9PerformanceSee Fire performancePerimeter of buildingDefinition Appendix AExample of footprint and perimeter Diagram 15.1Fire service vehicle access Table 15.1ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 183Phased evacuation 1.13Alarm systems 1.13, 3.21Disabled people 3.19Escape stairsAdded protection 3.34Minimum width 3.22, Table 3.3Internal speech communication system 3.21Protected escape routes 3.21Tall buildings 3.19–3.20Picture railsDefinition of walls and ceilings 6.3, 6.6PipesCavity barriers 9.17Definition Appendix AMaximum nominal internal diameter 10.4, Table 10.1Oil and gas pipes in protected shafts 8.36–8.38Openings 10.2–10.5, 10.24, Diagram 10.1Compartment walls or floors 8.30, 8.31Protected shafts 8.39Reaction to fire rating of insulation 9.12See also Gas service pipesPitched roofsArea measurement Diagram D3Measuring height Diagram D4Treated as wall or roof 13.15Places of special fire hazardCompartmentation 8.7Definition Appendix AEscape stairs 3.35Fire resisting construction 8.12Inner rooms 2.11Lift installations 5.39Limitations on travel distance Table 2.1Small premises 4.1Smoke vents 18.7Plant roomsExtract ductwork 10.10Fixed ladders 3.28Limitations on travel distance Table 2.1See also Boiler rooms; Places of special fire hazardPlasterboardTest substrates Appendix B9PlasticsLighting diffusersForming part of a ceiling 6.16–6.17Layout restrictions Diagrams 6.2 to 6.3Suspended ceilings 6.17, Appendix B12, Table 6.2Rooflights 6.8, 14.5–14.7Layout restrictions Diagram 6.2Limitations on spacing and size Diagram 6.2, Diagram 14.1Limitations on use and boundary distance Tables 14.2 to 14.3Spacing and size Diagram 6.2See also Thermoplastic materialsPlatform floorsDefinition Appendix AExclusions from elements of structure 7.3PlenumMaximum dimensions of cavities 9.12PodiumFire resistance of areas near to external stairs Diagram 3.4PolycarbonatesRooflights 14.7TP(a) rigid and TP(b) sheet Appendix B13Portal framesSeparation distances 13.16Power supplyProtected power circuits 5.29–5.31For ventilation systems 11.5PressurisationActivation by fire detection system 1.6Stairs and corridors 2.28, 8.36Prisons 0.15Private hydrants 16.8–16.11Progressive horizontal evacuationResidential care homes 2.35–2.40, Diagram 2.11Projecting upper storeySee Overhead obstructionsProperty protection 0.7Protected circuits 5.29–5.31Definition Appendix AProtected corridors 2.24Added protection for escape stairs 3.34Dead end corridors Diagram 2.10Definition Appendix AExtension beyond a protected stairway Diagram 2.8Fire doors Table C1Fire protection of lift installations 5.38–5.39Fire resistance Table B3Phased evacuation 3.21Provision 3.34Recessed areas Diagram 2.7Refuges for wheelchair users 3.5–3.6ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION184 Approved Document B Volume 2, 2019 edition Building Regulations 2010Storeys divided into different occupancies 2.17Uninsulated glazed elements on escape routes Table B5Protected escape routesCavity barriers 9.5Corridors 2.24Dead ends Diagram 2.10Discounting of stairs 3.15Ductwork passing through Diagram 10.2Escape stair needing added protection 3.34Phased evacuation 3.21Protection and compartmentation 8.12Storeys divided into different occupancies 2.17Ventilation ducts 10.8, 10.15–10.16Protected lobbiesDefinition Appendix ADiscounting of stairs 3.15Escape stairs 3.34Fire doors Table C1Fire resistance Table B3Lift installations 5.37–5.39Phased evacuation 3.21Provision 3.34–3.35Refuges for wheelchair users 3.5–3.6Refuse chutes and rooms for refuse storage 5.43Storey exits 2.14Uninsulated glazed elements on escape routes Table B5Ventilation 5.44Protected power circuits 5.29–5.30Definition Appendix AProtected shafts 8.6, 8.32–8.39, Diagram 8.3Construction 8.33Definition Appendix AExternal wall of stairs in 8.39, Diagram 13.5Fire doors Table C1Fire resistance 8.33, 8.39, Table B3Glazed screens 8.34–8.35, Diagram 8.4Lift installations 5.35Openings 8.39Pipes in 10.2Oil or gas pipes 8.36–8.37Protected stairways 3.23Provision 8.32Ventilating ducts in 8.36Ventilation of shafts conveying gas 8.38See also Firefighting shaftsProtected stairwaysDefinition Appendix AEscape stairs 3.23–3.41Exits from 3.36Exits in central core Diagram 2.4External walls adjacent to 3.29–3.30, 13.10, 13.12, Diagram 3.3Fire doors Table C1Fire resistance Table B3Lift installations 5.34, 5.41Location of 17.7Pipes and ducts in 8.36–8.37Refuges for wheelchair users 3.5–3.6, Diagram 3.2Refuse chutes and storage 5.43Rooflights of thermoplastic materials 6.15Separation from adjoining 3.37Separation of circulation routes from stairways 2.15Thermoplastic lighting diffusers in ceilings 6.17Uninsulated glazed elements on escape routes Table B5Use of space below diffusers or rooflights Table 6.2Use of space within 3.38Ventilation ducts 10.7Vertical escape 3.23–3.41Protective barriersFlat roof forming escape route 2.32PTFE‑based materials 6.10Public address system 1.11Publications (excluding BSI and European Standards) Appendix GPumping appliancesDry fire mains 15.4–15.5Fire service vehicle access 15.1Access route specification Table 15.2Buildings not fitted with fire mains Table 15.1Replenishing wet fire mains 15.5PumpsSprinkler systems Appendix E6Purpose groups 0.20–0.22Classification Table 0.1Definition Appendix AMinimum periods of fire resistance by purpose group Table B4PVCSee uPVCONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 185QQueueing areasFloor space factors Table D1RRackingSee Storage and other non-residential purpose groupRadiationSee Heat radiationRaftersPortal frames 13.16Timber, in compartment walls 8.16Raised storageFire resistance 7.6–7.7See also Storage and other non-residential purpose groupRampsEscape routes 5.18–5.19Reading roomsFloor space factors Table D1Reception deskProtected stairways 3.38Recirculating air distribution systemsMaximum dimensions of cavities 9.12Mechanical ventilation 10.9See also Air conditioningRecreationSee Assembly and recreation purpose groupRefugesMeans of escape for disabled 3.4–3.8, Diagrams 3.1 to 3.2Refuse chutes 5.42–5.45Openings for 8.31Protected shafts 8.32Refuse hoppers 5.42Refuse storage chambers 5.42–5.45Access 5.44Location of final exits 5.45Regulatory Reform (Fire Safety) Order 2005 page 126, 0.6Relevant boundaries 13.5, Diagram 13.2Acceptable unprotected areas 13.17Definition Appendix AExternal walls 1000mm or more from relevant boundary 13.9External walls within 1000mm of relevant boundary 13.8Portal frame building near boundary 13.16Separation distances for roof 14.3, Table 14.1Space separation for buildings fitted with sprinklers 13.22Residential care homesAncillary accommodationEscape routes 2.38Bedrooms 2.42–2.43Compartmentation 8.8–8.9Fire detection and alarm systems 2.41Horizontal escape 2.33–2.40Occupant capacity 2.39Progressive horizontal evacuation 2.35–2.40, Diagram 2.11Travel distance 2.37Regulation 7 (building materials) 12.15Self-closing devices 2.45Sprinkler systems 2.46Residential (institutional) purpose groupActivation of fire and smoke dampers 10.22Automatic fire detection and alarm systems 1.4Compartmentation 8.8–8.9Maximum dimensions of cavities Table 9.1Means of escapeCare homes 2.33–2.46, Diagram 2.11External escape stairs 3.31Inner rooms 2.11Limitations on travel distance Table 2.1Single escape routes and exits 2.6Minimum periods of fire resistance Table B4Minimum width of escape stairs 3.16, Table 3.1Partitions and provision of cavity barriers 9.7, 9.18Purpose groups Table 0.1Regulation 7 (building materials) 12.15Uninsulated glazed elements on escape routes Table B5Residential (other) purpose groupAcceptable unprotected areaCalculation 13.18–13.19, Table 13.1Automatic fire detection and alarm systems 1.4Compartmentation 8.10Fire doors Table C1Junction of compartment wall with roof 8.27Limitations on travel distance Table 2.1Maximum dimensions of cavities Table 9.1Minimum periods of fire resistance Table B4ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION186 Approved Document B Volume 2, 2019 edition Building Regulations 2010Minimum width of escape stairs 3.16Partitions and provision of cavity barriers 9.7, 9.18Purpose groups Table 0.1Residential useEscape lighting Table 5.1Purpose groups Table 0.1Space separation 13.1Notional boundaries 13.5Permitted unprotected areas 13.18–13.19, Table 13.1Wall and ceiling linings 6.4, Table 6.1See also Residential (institutional) purpose group; Residential (other) purpose groupRestaurantsEscape lighting Table 5.1Floor space factors Table D1Revolving doorsEscape routes 5.15Rising fire mainsSee Fire mainsRiskInsurance 0.7See also Places of special fire hazardRolling shutters 17.12, Appendix C9Roof coveringsCavities between insulated roof sheeting 9.8, Diagram 9.4External fire spread 14.1–14.9Separation distances for roofs Table 14.1Fire resistance Table B2Junction of compartment wall with roof 8.25–8.27, Diagram 8.2Slates and tiles 9.15, Diagram 8.2Thatch and wood shingles 14.9RooflightsArea measurement Diagram D3Definition Appendix ADefinition of ceilings 6.6Fire resistance 6.8Plastic 6.8, 6.15, 14.5–14.7Fire resistance Appendix B12Junction of compartment wall with roof 8.26Limitations on spacing and size Diagram 6.2, Diagram 14.1Limitations on use and boundary distance Table 14.2, Table 14.3Unwired glass 14.8Use of space below Table 6.2RoofsArea measurement Diagram D3Elements of structure 7.3Escape over 2.31–2.32, 3.33External escape stairs 3.32Fire resistance of adjacent areas Diagram 3.4Fire resistance Appendix B15 to B18, Table B3Height measurement Diagram D4Junction of compartment wall with roof 8.25–8.27, Diagram 8.2Roof-top plantHeight of top storey in building Diagram D4, Diagram D6Limitations on travel distance Table 2.1Space separation 13.15, 14.3–14.9See also Flat roofs; Pitched roofsRoof spaceCavity barriers 9.9–9.10Roof‑top plantHeight of top storey in building Diagram D4, Diagram D6Limitations on travel distance Table 2.1RoomsDefinition Appendix AMeasuring floor area Diagram D3SSafety signs and signalsFire doors Appendix C11Sanitary accommodationProtected shafts and stairways 3.38, 8.32Sanitary towel incineratorsProtected stairways 3.38Schools 0.14Definition Appendix ARegulation 7 (building materials) 12.15SealsPipes 10.3, 10.26SeatingSee Fixed seatingSecurityCompatibility with escape 2.8, 5.7See also Access controlSecurity fasteningsDoors on escape routes 5.7–5.8Self‑closing devicesDefinition Appendix AFire doorsets Appendix C5 to C6ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 187Residential care homes 2.45Self-closing fire doors 2.15Sub-divided corridors 2.26–2.28See also Automatic release mechanismsSeparated parts of buildings 8.19Definition Appendix ASeparate occupancies/usesCompartment walls and floors 8.11Corridors 2.17Division of storeys 2.17Escape routes 2.16–2.17Openings in compartment walls 8.30Separation distances 13.4Buildings with sprinkler systems 13.22Canopies 13.13–13.14, Diagram 13.6Compartment size 13.3Roofs 14.3–14.9, Table 14.1Unprotected areas which may be disregarded Diagram 13.5Service openingsSee OpeningsShaftsFire resisting construction for smoke outlet shafts 18.13–18.14, Diagram 18.1See also Firefighting shafts; Protected shafts; Smoke ventsSheltered housingDefinition Appendix ARegulation 7 (building materials) 12.15Shop and commercial purpose groupAncillary accommodation 8.12Ancillary use 0.21Compartmentation 8.11–8.12Door fastenings on escape routes 5.9Escape lighting Table 5.1Firefighting shafts 17.6Floor space factors Table D1Limitations on travel distance Table 2.1Maximum dimensions of building or compartment Table 8.1Maximum dimensions of cavities Table 9.1Minimum periods of fire resistance Table B4Purpose groups Table 0.1Shop front signs 12.22Space separationAcceptable unprotected areas 13.20, Table 13.1Sprinkler systems 8.14Store rooms 5.46See also Small premisesShopping complexes 0.12SignsSee Exit signs; Fire safety signsSimultaneous evacuationSee EvacuationSingle stair buildingsContinuation of lift down to basement storey 5.40Escape stairs 3.3, 3.24Added protection for 3.34Lift machine room location 5.40Travel distance in small premises Diagrams 4.1 to 4.3Uninsulated glazed elements on escape routes Table B5Single stepsEscape routes 3.26Single storey buildingsDefinition Appendix AFire resistance of elements of structure 7.2, Appendix B27, Table B4Maximum floor area Table 8.1Storage areas 7.6See also Portal frames; Sheltered housingSite (of a building)Definition Appendix ASkating rinksFloor space factors Table D1SkirtingsDefinition of walls 6.3Slates and tilesFire stopping junctions 9.15, Diagram 8.2Sleeping accommodationActivation of fire and smoke dampers 10.22Fire protection of lift installations 5.39See also Bedrooms; DormitoriesSleeping galleriesSee GalleriesSleeving for pipes 10.5, Diagram 10.1SlipperinessFloors of escape routes 3.32, 5.17Sloping floorsEscape routes 5.18–5.19See also RampsSmall premises 4.1–4.9Escape stairs 4.7–4.9Enclosure 3.23Single escape stairs 3.3, 4.7, Diagrams 4.1 to 4.3ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION188 Approved Document B Volume 2, 2019 edition Building Regulations 2010Horizontal escape 2.2, 4.1–4.6Travel distance 4.6, Diagrams 4.1 to 4.3Number of escape routes 2.6, 4.6Smoke alarmsDefinition Appendix ASee also Fire detection and alarm systemsSmoke and fumesCavity above enclosed corridor 2.27, Diagram 2.9Inhibition of smoke spreadCorridors 2.25–2.27Retarding by sealing or fire-stopping 10.1Smoke leakage of fire doors Appendix C1 to C2, Table C1Smoke reservoirs 5.36Smoke detectorsSee Fire detection and alarm systemsSmoke ventsAutomatic operation 10.9Basement storeys 18.1–18.15Final exits clear of 5.24Mechanical smoke extract 18.11–18.12Natural smoke outlets 18.5–18.10Firefighting shafts 17.9Fire resisting construction for outlet shafts 18.13–18.14Free area Appendix D5, Diagram D7Outlet terminal 18.8–18.10Protected lobbies 3.35Solar shading devices 12.19–12.20Definition Appendix A Space separationSee Separation distancesSpecified attachmentsDefinition Appendix ASpiral stairsEscape routes 3.27Sports grounds 0.13See also Assembly and recreation purpose groupSprinkler systems Appendix EFire detection and alarm systems 1.3As a compensatory feature Appendix E4Discounting of stairs 3.14Effect on acceptable unprotected area 13.22Effect on minimum periods of fire resistance Table B4Maximum dimensions of building or compartment Table 8.1Mechanical smoke extract 18.11Number and location of firefighting shafts 17.8Portal frames 13.16Provision 8.14, Appendix E2 to E4Raised storage areas 7.7Residential care homes 2.46Space separation 13.22Tall buildings 3.21Water supplies and pumps Appendix E5 to E6StabilityB3 requirement page 61See also IntegrityStadia 0.13See also Assembly and recreation purpose groupStaff roomsFloor space factors Table D1Stage gridsSee GalleriesStairsWidth measurement Appendix D4See also Escape stairs; Firefighting stairs; Protected stairwaysStallboardSmoke vent outlet terminal 18.9, Diagram 18.1Standard fire testsSee Fire performanceStanding spectator areasFloor space factors Table D1Steel framed buildingsCompartments 8.24Portal frames 13.16Steps (single)Escape routes 3.26StorageFire protection of lift installations 5.39Raised storage areas 7.6–7.7Refuse storage 5.42–5.45In shops 5.46, 8.11Storage and other non‑residential purpose groupAutomatic fire detection and alarm systems 1.5Compartmentation 8.11Escape lighting Table 5.1Fire service vehicle access to buildings without fire mains Table 15.1Floor space factors Table D1Limitations on travel distance Table 2.1Maximum dimensions of building or compartment Table 8.1Maximum dimensions of cavities Table 9.1ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 189Minimum periods of fire resistance Table B4Purpose groups Table 0.1Raised storage areas 7.7Space separationAcceptable unprotected areas 13.20, Table 13.1Roofs Table 14.1Sprinkler systems 8.14Widths of escape routes Table 2.3Store rooms 4.5, 5.46, 8.11Storey exits 2.23Access to 2.14Central core 2.12, Diagram 2.4Definition Appendix ADiscounting 2.21Division of corridors 2.26Escape over flat roofs 2.32Exit capacity 2.21–2.23StoreysCapacity of escape stairs Table 3.2Definition Appendix ADivided into different occupancies 2.17Divided into different uses 2.16, 3.2Height of top storey Diagram D6Number Diagram D5Stretched skin ceilingsThermoplastic material 6.18Strong roomsSmoke vents 18.4Structural framesFire resistance 7.1, Table B3Structural loadbearing elementsSee Elements of structureStudent residential accommodationFire detection and alarm systems 1.18 Regulation 7 (building materials) 12.15Stud wallsCavity barriers 9.14See also PartitionsStudy bedroomsFloor space factors Table D1SubstratesFire tests Appendix B8Lining to wall or ceiling Appendix B14SuppliersCertification and accreditation page iii, 1.16Suspended ceilingsDefinition Appendix AEnclosure of corridors by partitions 2.25Fire resistance 6.7, Table B3Lighting diffusers 6.16–6.17, Appendix B12, Diagrams 6.1 to 6.3, Table 6.2Spaces above 6.17Thermoplastic material 6.18Switch room/battery roomEscape lighting Table 5.1TTall buildingsEscape stairsAdded protection 3.34Width 3.19, 3.22, Table 3.3External walls 12.1Phased evacuation 3.20Technical specificationDefinition Appendix ATenanciesSee Separate occupancies/usesThatched roofs 14.9Theatres 0.13See also Assembly and recreation purpose groupThermoplastic materialsClassification Appendix B13Definition Appendix AFire performance Appendix B11 to B14Glazing 6.14Lighting diffusersForming part of a ceiling 6.16–6.17Layout restrictions Diagrams 6.2 to 6.3Suspended ceilings 6.17, Appendix B12, Table 6.2Rooflights 6.15, 14.6, Table 6.2Junction of compartment wall with roof 8.26Layout restrictions Diagrams 6.2 to 6.3Limitations on spacing and size Diagram 14.1Limitations on use and boundary distance Table 14.3Suspended or stretched skin ceiling 6.18Tiles and slatesFire-stopping at junctions 9.15, Diagram 8.2Timber structural componentsCompartments 8.16ToiletsEscape lighting Table 5.1Exits in central core Diagram 2.4See also Sanitary accommodationTransformer chambersFinal exits clear of openings 5.24See also Places of special fire hazardONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSION190 Approved Document B Volume 2, 2019 edition Building Regulations 2010Travel distanceDefinition Appendix AHorizontal escape 2.3–2.7, Table 2.1Dead end Diagram 2.1Inner rooms 2.11Residential care homes 2.37Single escape routes and exits 2.6–2.7Small premises 4.6, Table 4.1Measurement methods Appendix D3Vertical escape 3.23Small premises Diagrams 4.2 to 4.4Turning circlesFire service vehicle access 15.10, Diagram 15.3, Table 15.2TurnstilesEscape routes 5.15Turntable laddersSee High reach appliancesUUKASIndependent certification schemes Appendix B5Uninsulated glazingSee GlazingUnprotected areas 13.3, 13.6–13.16Acceptable unprotected area Table 13.1Calculation 13.17–13.23Effect of sprinkler systems 13.22External wall 1000mm or more from relevant boundary 13.9, 13.17External wall within 1000mm of relevant boundary 13.8Boundaries 13.4–13.5, Diagrams 13.1 to 13.3Combustible material as external surface 13.7, Diagram 13.4Definition Appendix AExternal wall of stairway in a protected shaft 13.10Fire resistance 13.6–13.7Large uncompartmented buildings 13.12Small unprotected areas 13.11, Diagram 13.5Unwired glassRooflights 14.8uPVCPipe openings 10.5Rooflights 14.7TP(a) rigid sheet Appendix B13VVehicle accessSee Fire service facilitiesVentilationCar parks 11.2–11.5Independent power supply 11.5Mechanical 10.6–10.11Protected lobbies 3.35Protected shafts 8.33Conveying gas 8.38Refuse chutes and storage 5.44See also Smoke ventsVentilation ducts 10.6–10.11AppliancesOpenings in compartment walls or floors 8.31, 10.23Passing through fire-separating elements 10.12–10.16In protected shafts 8.36Openings in enclosure 8.39Protection of openings 10.24Venues for pop concertsFloor space factors Table D1See also Assembly and recreation purpose groupVergesRoof measurements Diagram D3Vertical escape 3.1–3.41See also Escape stairs; Evacuation lifts; Protected stairwaysVision panelsDoors on escape routes 5.14Inner rooms 2.11Voice alarm systems 1.11, 1.15, 3.21Voice communication systemsEmergency (EVC) 3.21Volume of building or partMeasurement Diagram D2ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONBuilding Regulations 2010 Approved Document B Volume 2, 2019 edition 191WWaiting roomsFloor space factors Table D1Wall climberFire protection of lift installations 5.36WallsCavities 6.17, 9.10Cavity barriers in stud walls or partitions 9.14In common to two buildings 8.2, 8.18Definition 6.2–6.4Elements of structure 7.3, 7.4Fire resistance 7.1, 12.2, Table B3Inner rooms 2.11Linings 6.2–6.4See also Cavity walls; Compartment walls; External wallsWarehousesSee Storage and other non-residential purpose groupWarningFor hearing impaired people 1.15See also Fire alarm systems; Voice alarm systemsWashroomsProtected shafts and stairways 3.38, 8.32Water suppliesFire hydrants 16.12–16.13Sprinkler systems Appendix E5 to E6WCsSee ToiletsWeather protectionExternal escape stairs 3.32Wet mainsSee Fire mainsWindowless accommodationEscape lighting Table 5.1WindowsDefinitions of walls and ceilings 6.3, 6.6External fire spread 12.22Thermoplastic glazing 6.14See also RooflightsWiringSee Electrical wiringWoodSee Timber structural componentsWood shingles 14.9Workmanship and materialsSee Materials and workmanshipWorkshopsFloor space factors Table D1ONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONONLINE VERSIONList of Approved Documents The following documents have been published to give guidance on how to meet the Building Regulations. You can find the date of the edition approved by the Secretary of State at www.gov.uk.Approved Document A StructureApproved Document BFire safetyVolume 1: DwellingsApproved Document BFire safetyVolume 2: Buildings other than dwellingsApproved Document CSite preparation and resistance to contaminants and moistureApproved Document DToxic substancesApproved Document EResistance to the passage of soundApproved Document FVentilationVolume 1: DwellingsApproved Document FVentilationVolume 2: Buildings other than dwellingsApproved Document GSanitation, hot water safety and water efficiencyApproved Document HDrainage and waste disposalApproved Document JCombustion appliances and fuel storage systemsApproved Document KProtection from falling, collision and impactApproved Document LConservation of fuel and powerVolume 1: DwellingsApproved Document LConservation of fuel and powerVolume 2: Buildings other than dwellingsApproved Document MAccess to and use of buildingsVolume 1: DwellingsApproved Document MAccess to and use of buildingsVolume 2: Buildings other than dwellingsApproved Document OOverheating Approved Document PElectrical safety – DwellingsApproved Document QSecurity – DwellingsApproved Document RInfrastructure for electronic communicationsVolume 1: Physical infrastructure and network connection for new dwellings Approved Document RInfrastructure for electronic communicationsVolume 2: Physical infrastructure for high-speed electronic communications networksApproved Document SInfrastructure for the charging of electric vehicles Approved Document 7Materials and workmanshipONLINE VERSIONONLINE VERSIONThe Building Regulations 2010, Approved Documents are available from:RIBA BooksOnline: www.architecture.com/ribabooksTelephone: +44 (0)20 7496 8383Email: sales@books.architecture.com© Crown Copyright 2022The content of this publication, excluding logos, may be reproduced free of charge in any format or medium for research, private study or for internal circulation within an organisation. This is subject to it being reproduced accurately and not used in a misleading context. The material must be acknowledged as Crown copyright and the title and edition of the publication specified. This document/publication is value added. You may re-use the content (not including logos) free of charge in any format or medium, under the terms of the Open Government Licence. To view this licence, visit: http://www.nationalarchives.gov.uk/doc/open-government-licence/ or write to the Information Policy Team, The National Archives, Kew, London TW9 4DU, or e-mail: psi@nationalarchives.gov.uk. If you require this publication in an alternative format, please email: alternativeformats@levellingup.gov.uk.Copyright in the typographical arrangement, excluding logos, of the cover and internal page layouts of this publication rests with the Publisher. ISBN 978 1 915722 16 4 9781915722164ONLINE VERSIONONLINE VERSION \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/FICTIF_TABLE_INDEX.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/FICTIF_TABLE_INDEX.txt new file mode 100644 index 000000000..42debad81 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/FICTIF_TABLE_INDEX.txt @@ -0,0 +1 @@ +BULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 11 N°BUL/IND : 000001/04 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  13/06/2022    Emploi Ech Statut    7     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      100040  SALAIRE DE BASE151,67 12,00000 1.820,04    109510  Hrs supl. 25%17,33 15,00000 259,95    110100  Hrs dépan. 25%2,00 15,00000 30,00    110200  Hrs dépan. 50%2,00 18,00000 36,00    185000  Primes Astreintes 11/11>18/11  90,00    185010  Primes Dépannages  112,00    390010  Congés Payés(2023) 28/101,00 96,00000 96,00    390110  Abs CP 28/10­1,00 95,99939  96,00   490100  ***REMUNERATION TOTALE***  2.347,99    550010  SANTE      552210  SS Maladie Mat Inv Décès2.347,99    164,36  556000  Complémentaire Incap Inv Décès   9,63 28,88  557000  Complémentaire Santé   1,00 35,80  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    87,81  550040  RETRAITE      552010  Sécurité sociale plafonnée2.347,99 6,900 %  162,01 200,75  552000  Sécurité sociale déplafonnée2.347,99 0,400 %  9,39 44,61  554000  Complémentaire Tranche 12.347,99 4,010 %  94,15 141,12  550050  FAMILLE      552200  Allocations familiales    81,01  550060  ASSURANCE CHOMAGE      553000  Chômage2.347,99    95,09  553010  AGS2.347,99    3,52  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    50,15  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE       NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE                  Détail CP Acquis                 En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11DEVELOPPEUR ASSERMENTECECI EST UN TEST EXCELLENT FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA18 ESPACE DE LA TAR00001 ESSAI AAAAAAAAAAAAAM. HERNANDEZ DANIELBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 11 N°BUL/IND : 000001/04 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  13/06/2022    Emploi Ech Statut    7     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.050,33 2,900 %  59,46   559030  CSG déductible2.050,33 6,800 %  139,42   559050  CSG/CRDS non déductible Autres320,25 9,700 %  31,06   550110  EXO ECRET ET ALLEGEM DE COTIS.      552500  Exo Ecrêt et Allègem de Cotis.  36,86  ­412,00  699500  **TT COTISATIONS SALARIALES**   469,26   699610  **TT COTISATIONS PATRONALES**    566,69  559960  ***REINT IMPOT SUR MUT***  34,80    559970  ***NET IMPOSABLE***  1.678,10    559980  *TT VERSE PAR L'EMPLOYEUR *    2.914,68  559990  TT ALLEGEMENT DE COTISATIONS*    595,14  920000  Dont gain sur pouvoir d'achat  33,67                                                                                                                                                                       NET A PAYER AVANT IMPOT SUR LE REVENU  1.878,73    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  1678,10 8540,76   Impôt sur le revenu prélevé à la source1.678,10  0,00 % 0,00  19,68   Montant net des heures compl/suppl exonérées  304,17 1406,82  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CA DE L ANJOU ET DU MAIN 1.878,73 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 2.411,67 2.347,99 165,20 173,00  12.121,75 11.802,59 897,73 941,19   CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE   11,73 2,00 9,73                   Détail CP Acquis                 En cours                          A PRENDRE PRIS SOLDE   11,73 2,00 9,73                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11DEVELOPPEUR ASSERMENTECECI EST UN TEST EXCELLENT FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA18 ESPACE DE LA TAR00001 ESSAI AAAAAAAAAAAAAM. HERNANDEZ DANIELBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 5 N°BUL/IND : 000002/03 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  15/02/2021    Emploi Ech Statut    10     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      100040  SALAIRE DE BASE151,67 13,50000 2.047,55    109510  Hrs supl. 25%17,33 16,87504 292,44    390010  Congés Payés(2022) 03/11­04/112,00 108,00000 216,00    390110  Abs CP 03/11 au 04/11­2,00 107,99937  216,00   490100  ***REMUNERATION TOTALE***  2.339,99    550010  SANTE      552210  SS Maladie Mat Inv Décès2.339,99    163,80  556000  Complémentaire Incap Inv Décès   9,59 28,78  557000  Complémentaire Santé   63,40 35,80  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    87,52  550040  RETRAITE      552010  Sécurité sociale plafonnée2.339,99 6,900 %  161,46 200,07  552000  Sécurité sociale déplafonnée2.339,99 0,400 %  9,36 44,46  554000  Complémentaire Tranche 12.339,99 4,010 %  93,83 140,64  550050  FAMILLE      552200  Allocations familiales    80,73  550060  ASSURANCE CHOMAGE      553000  Chômage2.339,99    94,77  553010  AGS2.339,99    3,51  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    49,98  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.075,30 2,900 %  60,19   559030  CSG déductible2.075,30 6,800 %  141,12   559050  CSG/CRDS non déductible Autres287,32 9,700 %  27,87    NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR2222222222222 22INGENIEUR AAAAAAAAAAAAAAAAAQABCD FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA LE CIRQ00002 HYPOTHESEMme ALIBERT CHLOE AABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 5 N°BUL/IND : 000002/03 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  15/02/2021    Emploi Ech Statut    10     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 550110  EXO ECRET ET ALLEGEM DE COTIS.      552500  Exo Ecrêt et Allègem de Cotis.  33,07  ­370,43  699500  **TT COTISATIONS SALARIALES**   533,75   699610  **TT COTISATIONS PATRONALES**    605,22  559960  ***REINT IMPOT SUR MUT***  34,80    559970  ***NET IMPOSABLE***  1.636,66    559980  *TT VERSE PAR L'EMPLOYEUR *    2.945,21  559990  TT ALLEGEMENT DE COTISATIONS*    552,95  920000  Dont gain sur pouvoir d'achat  33,55                                                                                                                                                                                                           NET A PAYER AVANT IMPOT SUR LE REVENU  1.806,24    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  1636,66 18002,50   Impôt sur le revenu prélevé à la source1.636,66  0,00 % 0,00  0,00   Montant net des heures compl/suppl exonérées  272,90 3143,63  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CA DE L ANJOU ET DU MAIN 1.806,24 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 2.403,57 2.339,99 153,40 169,00  26.593,02 25.891,77 1.704,20 1.868,00   CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE25,00 21,00 4,00 12,48  12,48                   Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE25,00 21,00 4,00 12,48  12,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR2222222222222 22INGENIEUR AAAAAAAAAAAAAAAAAQABCD FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA LE CIRQ00002 HYPOTHESEMme ALIBERT CHLOE AABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 2 N°BUL/IND : 000003/02 Centre de gestion SAV / CADRESOCIÉTÉ Date ancienneté    N° Sécurité sociale  15/07/2019    Emploi Position Statut  IA       Cadre Forfait ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      105000  Acpt forfait annuel 218 jours  2.723,75    185000  Primes Astreintes 04/11>11/11  90,00    475800  Repos Forfait Pris1,00 125,71135 125,71    475800  Repos Forfait Pris2,00 125,71135 251,42    475810  Rep Forf Jrs Pris 17/11 au 18/­2,00 125,71135  251,42   475810  Rep Forf Jrs Pris 30/11­1,00 125,71135  125,71   490100  ***REMUNERATION TOTALE***  2.813,75    550010  SANTE      552210  SS Maladie Mat Inv Décès2.813,75    196,96  556000  Complémentaire Incap Inv Décès   10,13 43,33  557000  Complémentaire Santé   111,70 68,20  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    105,23  550040  RETRAITE      552010  Sécurité sociale plafonnée2.813,75 6,900 %  194,15 240,58  552000  Sécurité sociale déplafonnée2.813,75 0,400 %  11,26 53,46  554000  Complémentaire Tranche 12.813,75 4,010 %  112,83 169,11  550050  FAMILLE      552200  Allocations familiales    97,07  550060  ASSURANCE CHOMAGE      553000  Chômage2.813,75    113,96  553010  AGS2.813,75    4,22  553020  APEC2.813,75 0,024 %  0,68 1,01  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    60,10  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59   NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée              CONGES PAYES ReposForfait Jrs   AcquisEn cours Jours   A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 12LEAD DEV AIDJELFPRITUYS FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA LE HAMEAU AAAAAAAAAA00003 CONSIDERAM. SIMPSON BART AAABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 2 N°BUL/IND : 000003/02 Centre de gestion SAV / CADRESOCIÉTÉ Date ancienneté    N° Sécurité sociale  15/07/2019    Emploi Position Statut  IA       Cadre Forfait ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 559000  CSG/RDS non déductible2.875,04 2,900 %  83,38   559030  CSG déductible2.875,04 6,800 %  195,50   550110  EXO ECRET ET ALLEGEM DE COTIS.      699500  **TT COTISATIONS SALARIALES**   719,63   699610  **TT COTISATIONS PATRONALES**    1.198,82  559960  ***REINT IMPOT SUR MUT***  67,20    559970  ***NET IMPOSABLE***  2.244,70    559980  *TT VERSE PAR L'EMPLOYEUR *    4.012,57  559990  TT ALLEGEMENT DE COTISATIONS*    219,48  920000  Dont gain sur pouvoir d'achat  39,76                                                                                                                                                                                                  NET A PAYER AVANT IMPOT SUR LE REVENU  2.094,12    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  2244,70 24557,25   Impôt sur le revenu prélevé à la source2.244,70  0,00 % 0,00  0,00   Montant net des heures compl/suppl exonérées  0,00 92,17  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : BNPPARB VITRE 2.094,12 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée   2.924,28 2.813,75    31.966,71 30.753,91     CONGES PAYES ReposForfait Jrs   AcquisEn cours Jours   A PRENDRE PRIS SOLDE25,00 14,00 11,00 12,48  12,48    9,13 7,00 2,13             Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE25,00 14,00 11,00 12,48  12,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 12LEAD DEV AIDJELFPRITUYS FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA LE HAMEAU AAAAAAAAAA00003 CONSIDERAM. SIMPSON BART AAABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 9 N°BUL/IND : 000004/03 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  01/03/2022    Emploi Ech Statut    8     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      100040  SALAIRE DE BASE151,67 13,00000 1.971,71    109510  Hrs supl. 25%17,33 16,25000 281,61    110100  Hrs dépan. 25%2,00 16,25000 32,50    185000  Primes Astreintes 25/11>30/11  90,00    185010  Primes Dépannages  56,00    490100  ***REMUNERATION TOTALE***  2.431,82    550010  SANTE      552210  SS Maladie Mat Inv Décès2.431,82    170,23  556000  Complémentaire Incap Inv Décès   9,97 29,91  557000  Complémentaire Santé   1,00 35,80  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    90,95  550040  RETRAITE      552010  Sécurité sociale plafonnée2.431,82 6,900 %  167,80 207,92  552000  Sécurité sociale déplafonnée2.431,82 0,400 %  9,73 46,20  554000  Complémentaire Tranche 12.431,82 4,010 %  97,51 146,15  550050  FAMILLE      552200  Allocations familiales    83,90  550060  ASSURANCE CHOMAGE      553000  Chômage2.431,82    98,49  553010  AGS2.431,82    3,65  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    51,96  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.145,36 2,900 %  62,22   559030  CSG déductible2.145,36 6,800 %  145,88    NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11OFFICE MANAGER aaaaaaaaaaEVENT MANAGER dkeurisproTEST TPDOER FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DE LA REINE AAA00007 LONDRES AAAAAAAAAAAAAM. BOND JAMES ABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 9 N°BUL/IND : 000004/03 Centre de gestion SAV / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  01/03/2022    Emploi Ech Statut    8     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 559050  CSG/CRDS non déductible Autres308,61 9,700 %  29,94   550110  EXO ECRET ET ALLEGEM DE COTIS.      552500  Exo Ecrêt et Allègem de Cotis.  35,53  ­346,87  699500  **TT COTISATIONS SALARIALES**   488,52   699610  **TT COTISATIONS PATRONALES**    663,88  559960  ***REINT IMPOT SUR MUT***  34,80    559970  ***NET IMPOSABLE***  1.756,15    559980  *TT VERSE PAR L'EMPLOYEUR *    3.095,70  559990  TT ALLEGEMENT DE COTISATIONS*    536,55  920000  Dont gain sur pouvoir d'achat  34,88                                                                                                                                                                                                  NET A PAYER AVANT IMPOT SUR LE REVENU  1.943,30    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  1756,15 15690,73   Impôt sur le revenu prélevé à la source1.756,15  0,00 % 0,00  83,99   Montant net des heures compl/suppl exonérées  293,12 3005,11  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CCM ERNEE BOCAGE 1.943,30 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 2.496,53 2.431,82 171,00 171,00  22.727,03 22.141,49 1.475,70 1.561,50   CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE7,00 7,00  12,48 4,00 8,48                   Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE7,00 7,00  12,48 4,00 8,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11OFFICE MANAGER aaaaaaaaaaEVENT MANAGER dkeurisproTEST TPDOER FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DE LA REINE AAA00007 LONDRES AAAAAAAAAAAAAM. BOND JAMES ABULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 1 N°BUL/IND : 000005/02 Centre de gestion SAV / CADRESOCIÉTÉ Date ancienneté    N° Sécurité sociale  07/07/2014    Emploi Position StatutVI   IA       Cadre Forfait ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      105000  Acpt forfait annuel 218 jours  2.827,50    185000  Primes Astreintes 18/11>25/11  90,00    475800  Repos Forfait Pris1,00 130,49980 130,50    475810  Rep Forf Jrs Pris 04/11­1,00 130,49980  130,50   490100  ***REMUNERATION TOTALE***  2.917,50    550010  SANTE      552210  SS Maladie Mat Inv Décès2.917,50    204,23  556000  Complémentaire Incap Inv Décès   10,50 44,93  557000  Complémentaire Santé   1,00 68,20  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    109,11  550040  RETRAITE      552010  Sécurité sociale plafonnée2.917,50 6,900 %  201,31 249,45  552000  Sécurité sociale déplafonnée2.917,50 0,400 %  11,67 55,43  554000  Complémentaire Tranche 12.917,50 4,010 %  116,99 175,35  550050  FAMILLE      552200  Allocations familiales    100,65  550060  ASSURANCE CHOMAGE      553000  Chômage2.917,50    118,16  553010  AGS2.917,50    4,38  553020  APEC2.917,50 0,024 %  0,70 1,05  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    62,32  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.978,57 2,900 %  86,38   559030  CSG déductible2.978,57 6,800 %  202,54    NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES ReposForfait Jrs   AcquisEn cours Jours   A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11STAGIAIRE A DUREE INDETERMINE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DES ILLUSIONS PERDUES00006 ROMANM. DE BALZAC HONOREBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 1 N°BUL/IND : 000005/02 Centre de gestion SAV / CADRESOCIÉTÉ Date ancienneté    N° Sécurité sociale  07/07/2014    Emploi Position StatutVI   IA       Cadre Forfait ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 550110  EXO ECRET ET ALLEGEM DE COTIS.      699500  **TT COTISATIONS SALARIALES**   631,09   699610  **TT COTISATIONS PATRONALES**    1.238,85  559960  ***REINT IMPOT SUR MUT***  67,20    559970  ***NET IMPOSABLE***  2.439,99    559980  *TT VERSE PAR L'EMPLOYEUR *    4.156,35  559990  TT ALLEGEMENT DE COTISATIONS*    227,57  920000  Dont gain sur pouvoir d'achat  41,27                                                                                                                                                                                                                    NET A PAYER AVANT IMPOT SUR LE REVENU  2.286,41    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  2439,99 27538,71   Impôt sur le revenu prélevé à la source2.439,99  2,40 % 58,56  620,78   Montant net des heures compl/suppl exonérées  0,00 81,54  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CRCAM DE NORMANDIE 2.227,85 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 3.029,63 2.917,50 144,67 151,67  34.285,72 33.037,75 1.454,87 1.671,87   CONGES PAYES ReposForfait Jrs   AcquisEn cours Jours   A PRENDRE PRIS SOLDE25,00 15,00 10,00 12,48  12,48    9,13 6,00 3,13             Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE25,00 15,00 10,00 12,48  12,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11STAGIAIRE A DUREE INDETERMINE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DES ILLUSIONS PERDUES00006 ROMANM. DE BALZAC HONOREBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 8 N°BUL/IND : 000006/02 Centre de gestion SAV / ART 36SOCIÉTÉ Date ancienneté    N° Sécurité sociale  14/06/2021    Emploi Ech Statut    20     Agent de Maîtrise NC ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      100040  SALAIRE DE BASE151,67 14,47023 2.194,70    109510  Hrs supl. 25%17,33 18,08779 313,46    390010  Congés Payés(2022) 07/111,00 126,54000 126,54    390110  Abs CP 07/11­1,00 115,76105  115,76   490100  ***REMUNERATION TOTALE***  2.518,94    550010  SANTE      552210  SS Maladie Mat Inv Décès2.518,94    176,33  556000  Complémentaire Incap Inv Décès   13,35 36,02  557000  Complémentaire Santé   1,00 68,20  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    94,21  550040  RETRAITE      552010  Sécurité sociale plafonnée2.518,94 6,900 %  173,81 215,37  552000  Sécurité sociale déplafonnée2.518,94 0,400 %  10,08 47,86  554000  Complémentaire Tranche 12.518,94 4,010 %  101,01 151,38  550050  FAMILLE      552200  Allocations familiales    86,90  550060  ASSURANCE CHOMAGE      553000  Chômage2.518,94    102,02  553010  AGS2.518,94    3,78  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    53,80  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.270,10 2,900 %  65,83   559030  CSG déductible2.270,10 6,800 %  154,37   559050  CSG/CRDS non déductible Autres307,97 9,700 %  29,87    NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11AGENT DE SECURITE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DU PUGILAT AAA A00006 ROMANM. STALLONE SILVESTERBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 8 N°BUL/IND : 000006/02 Centre de gestion SAV / ART 36SOCIÉTÉ Date ancienneté    N° Sécurité sociale  14/06/2021    Emploi Ech Statut    20     Agent de Maîtrise NC ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 550110  EXO ECRET ET ALLEGEM DE COTIS.      552500  Exo Ecrêt et Allègem de Cotis.  35,45  ­277,37  699500  **TT COTISATIONS SALARIALES**   513,87   699610  **TT COTISATIONS PATRONALES**    804,09  559960  ***REINT IMPOT SUR MUT***  67,20    559970  ***NET IMPOSABLE***  1.854,51    559980  *TT VERSE PAR L'EMPLOYEUR *    3.323,03  559990  TT ALLEGEMENT DE COTISATIONS*    473,85  920000  Dont gain sur pouvoir d'achat  35,52                                                                                                                                                                                                           NET A PAYER AVANT IMPOT SUR LE REVENU  2.005,07    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  1854,51 19055,20   Impôt sur le revenu prélevé à la source1.854,51  3,20 % 59,34  1210,46   Montant net des heures compl/suppl exonérées  292,52 2985,75  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CCM LAVAL BRETAGNE 1.945,73 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 2.622,16 2.518,94 161,20 169,00  26.913,95 25.805,71 1.525,94 1.747,68   CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE25,00 19,00 6,00 12,48  12,48                   Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE25,00 19,00 6,00 12,48  12,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11AGENT DE SECURITE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DU PUGILAT AAA A00006 ROMANM. STALLONE SILVESTERBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 10 N°BUL/IND : 000007/02 Centre de gestion MAG / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  23/03/2022    Emploi Ech StatutPIECES RECHANGE ET    9     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 000300  **Nbre Jours du Mois**30,00      100040  SALAIRE DE BASE151,67 13,90000 2.108,21    109510  Hrs supl. 25%17,33 17,37507 301,11    110100  Hrs Choisies 25%4,00 17,37507 69,50    490100  ***REMUNERATION TOTALE***  2.478,82    550010  SANTE      552210  SS Maladie Mat Inv Décès2.478,82    173,52  556000  Complémentaire Incap Inv Décès   10,16 30,49  557000  Complémentaire Santé   1,00 35,80  550020  ACCIDENTS DU TRAVAIL ­MALADIES      550030  PROFESSIONNELLES      553900  Accident du travail ­ Mal Prof    92,71  550040  RETRAITE      552010  Sécurité sociale plafonnée2.478,82 6,900 %  171,04 211,94  552000  Sécurité sociale déplafonnée2.478,82 0,400 %  9,92 47,10  554000  Complémentaire Tranche 12.478,82 4,010 %  99,40 148,98  550050  FAMILLE      552200  Allocations familiales    85,52  550060  ASSURANCE CHOMAGE      553000  Chômage2.478,82    100,39  553010  AGS2.478,82    3,72  550070  AUTRES CONTRIBUTIONS DUES      550080  PAR L'EMPLOYEUR      558000  Autres contributions    52,95  550090  COTISATIONS STATUTAIRES OU      550100  PREVUES CONVENTION COLLECTIVE      558630  Autres cotisations    45,59  559000  CSG/RDS non déductible2.136,61 2,900 %  61,96   559030  CSG déductible2.136,61 6,800 %  145,29   559050  CSG/CRDS non déductible Autres364,12 9,700 %  35,32   550110  EXO ECRET ET ALLEGEM DE COTIS.       NET A PAYER AVANT IMPOT SUR LE REVENU    Impôt sur le revenu Base Taux personnalisé Montant Cumul                 NET A PAYER      CALENDRIER LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées            CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE                  Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE                              101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.1/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11VENDEUR EXPERIMENTE CEO ABDFORMIDABLE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DE L'EXCELLENCE00009 PERFECTIONM. SCOTT MICHAELBULLETIN DE SALAIRE Lieu de paiement des cotisations       PERIODE Novembre 2022 DU 01/11/2022 AU 30/11/2022 Matricule : 10 N°BUL/IND : 000007/02 Centre de gestion MAG / EMPLOYESOCIÉTÉ Date ancienneté    N° Sécurité sociale  23/03/2022    Emploi Ech StatutPIECES RECHANGE ET    9     Employe(e) ÉTABLISSEMENT CONVENTION COLLECTIVERubLibelléBase ou NombreTauxGainRetenuePatronalesMontant 552500  Exo Ecrêt et Allègem de Cotis.  41,92  ­341,78  699500  **TT COTISATIONS SALARIALES**   492,17   699610  **TT COTISATIONS PATRONALES**    686,93  559960  ***REINT IMPOT SUR MUT***  34,80    559970  ***NET IMPOSABLE***  1.748,12    559980  *TT VERSE PAR L'EMPLOYEUR *    3.165,75  559990  TT ALLEGEMENT DE COTISATIONS*    535,13  920000  Dont gain sur pouvoir d'achat  35,57                                                                                                                                                                                                                    NET A PAYER AVANT IMPOT SUR LE REVENU  1.986,65    Impôt sur le revenu Base Taux personnalisé Montant Cumul  Montant net imposable  1748,12 14184,40   Impôt sur le revenu prélevé à la source1.748,12  0,00 % 0,00  0,00   Montant net des heures compl/suppl exonérées  345,85 3515,82  PAIEMENT PAR VIREMENT Le 30 Novembre  2022 NET A PAYER Domiciliation : CCM ANDOUILLE 1.986,65 EUR     CALENDRIER du 01/11/2022 au 30/11/2022LMMJVSDLIBELLÉSMOISCUMULS ANNUELS Brut fiscal Base S.S. plafonnée Hrs Trav Hrs Payées 2.544,11 2.478,82 173,00 173,00  21.417,59 20.872,03 1.441,44 1.480,44   CONGES PAYES     AcquisEn cours     A PRENDRE PRIS SOLDE5,00 5,00  12,48  12,48                   Détail CP Acquis              Acquis  En cours                          A PRENDRE PRIS SOLDE5,00 5,00  12,48  12,48                         101143/01/01PPour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.2/2Pour plus d’informations sur le bulletin de paie, reportezvous à la rubrique disponible sur LE CIRQail www.servicepublic.fr FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR1111111111111 11VENDEUR EXPERIMENTE CEO ABDFORMIDABLE FICTIF TESTS ZI DE L'IMAGINAIRE 345 ALLEE DES LILAS DURS 00000 TESTAR SIRET : 111111111 00000  NAF : 0000A Convention AAAAAAAAAAAAAAAA1 RUE DE L'EXCELLENCE00009 PERFECTIONM. SCOTT MICHAEL \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/MOZILLA-3136-0.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/MOZILLA-3136-0.txt new file mode 100644 index 000000000..1d12216cf --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/MOZILLA-3136-0.txt @@ -0,0 +1 @@ +Cyan – Magenta – Yellow – Black6354Zweck Mit dieser Form kann getestet werden, ob ein Ausgabe-Workflow PDF/X-4-kompatibel ist. Sie enthält kritische Elemente, die grundsätzlich alle in PDF/X-4-Dateien zuge-lassen sind. Sie ist aber nicht PDFX-ready-konform, da zur Fehlerdarstellung teilweise extreme Definitionen verwen-det werden.Vorgehen Diese Testdatei soll genauso verarbeitet werden, wie eine normal angelieferte PDF/X-4-Datei. Die A4-Seiten sollen zu einer Form (mit Berücksichtigung der TrimBox) ausgeschossen resp. in einem Umbruch (ohne Beschnitt) platziert werden. Achtung: unterschiedliche Beschnittwerte bei jeder Seitenkante! © 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)24687531PDF/X-4TestPDFX-ready Output-Test V3.0V3.01 / 10.09.13 Seite 1 / 403 Nov 2005Ghent PDF Workgroup © www.gwg.org6.0GWG 6.0 - Use of shadingsThe shadings should looklike the reference imageashading type 3reference imageshading type 7reference imagebcshading type 7reference imageshading type 2reference imaged03 Nov 2005Ghent PDF Workgroup © www.gwg.org6.1GWG 6.1 - Use of shadingsThe shadings should looklike the reference imageashading type 2reference imageshading type 3reference imagebcshading type 3reference imageshading type 2reference imagedGWG 1.1 - CMYK Overprint Mode27 Dec 20061.1Ghent PDF Workgroup © www.gwg.orgOPM 0OPM 1If an X appears the Overprint Mode (OPM) is not respected.Rect (overpr) 0 / 0 / 10 / 50Cross 90 / 10 / 90 / 0Cross (overpr) 90 / 10 / 90 / 0Cross 0 / 0 / 10 / 50Rect 90 / 10 / 10 / 5008 Dec 2005 Ghent PDF Workgroup© www.gwg.org 1.0abcdefghijGWG 1.0 - CMYK Overprint Test��OPM 0OPM 1fontvectorimagemaskshadingfontvectorimagemaskshadingGWG 19.0 – DeviceN Overprint (Black)12 Dec 201219.0OP is true for all topmost elements.Cyan (DeviceN - 100C)CMYK BlackCyan (DeviceN - 100C0Y0K)CMYK BlackVectorImageVectorImagecabda + b: must be rendered to solid Black (100C100K) rectangles A faint X means, that OP is not honored (or image was converted to DeviceCMYK for b)c + d: must be rendered to solid Cyan rectanglesc: X means, that color space might have been converted to DeviceCMYK upfront (OPM 1)d: X means, that 0% Channels might have been ignored or color was converted© Ghent Workgroup, www.gwg.orgGWG 19.1 – DeviceN Overprint (Yellow)12 Dec 201219.1a + b: must be rendered to solid Green rectangles Cyan X means, that OP is not honored (or image was converted to DeviceCMYK for b)c + d: must be rendered to solid Cyan rectanglesc: X means, that color space might have been converted to DeviceCMYK upfront (OPM 1)d: colored X means, that 0% Channels might have been ignored or color was convertedCross: Cyan (DeviceN - 100C)Overprinting: 0C0M100Y0KReference: 100C0M100Y0K (Green)Cross: Cyan (DeviceN - 100C0Y)Overprinting: 0C0M100Y0KReference: 100C0M0Y0KVectorImageVectorImagecabd© Ghent Workgroup, www.gwg.orgExport to PDF/X-1aUse Pitstop to change overprinting to truemap GWG Green to Nonemap Schwar to SchwarzGWG 19.2 – DeviceN Overprint (White)12 Dec 201219.2a + b: must be rendered to solid Red rectangles White X means, that OP is not honored (or image was converted to DeviceCMYK for b)c + d: must be rendered to solid White rectanglesc: X means, that color space might have been converted to DeviceCMYK upfront (OPM 1)d: colored X means, that 0% Channels might have been ignored or color was convertedWhite (DeviceN - 0K)CMYK RED (100M100Y)White (DeviceN - 0C0M0Y0K)CMYK RED (100M100Y)OP is true for all topmost elements.VectorImageVectorImagecabd© Ghent Workgroup, www.gwg.orgExport to PDF/X-1aUse Pitstop to change overprinting to trueOPM 0map GWG Green to Nonemap Schwar to SchwarzGWG 8.2 - DeviceN Support (4 colors)27 Dec 20068.2Ghent PDF Workgroup © www.gwg.orgDuotone (Black and Cyan) Grayscale TIFF with Cyan backgroundIf a check mark is visible in the upper right corner then DeviceN is respected (= GOOD). If no check mark appears then DeviceN color was transformed to CMYK (= ERROR).If the images are missing completely then DeviceN is not supported at all (= ERROR).Für die Zertifizierungen dürfen nur personalisierte Testformen verwendet werden!3546Native Transparenzverarbeitung mit PDF-RIP Diese PDF/X-4-Datei enthält Transparenzen. Mit Vorteil wird für die Ausgabe ein PDF-RIP (z.B. Adobe PDF Print Engine oder Harlequin-RIP) verwendet. Dabei muss darauf geachtet werden, dass im vorgelagerten Workflow die Transparenzen erhalten bleiben und nativ an den RIP über-geben werden, damit sie dort verarbeitet werden können. Keine Veränderung der Überdrucken-Parameter Sollte eine Transparenzreduktion stattfinden, muss unbedingt dafür Sorge getragen werden, dass die Über-drucken-Befehle vom Workflow nicht verändert werden, da die meisten Transparenzreduktionsmodule Überdruk-ken zur Simulation von Transparenzen einsetzen. Sonst erscheinen unweigerlich Kreuze.© 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)© 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)15131116141210PDF/X-4TestPDFX-ready Output-Test V3.09Cyan – Magenta – Yellow – BlackSeite 2 / 4V3.01 / 10.09.1305 Nov 2012 © Ghent Workgroup, www.gwg.org 16.0PDF/X-4GWG 16.0 - Transparency Basic Blend Modes (DeviceCMYK, Non-Knockout)If an 'X' appears, rendering of Non-knockout Transparency Groups (a transparency effect) is not performed correctly.DarkenMultiplyColor BurnLightenScreenColor dodgeOverlaySoft LightHard LightDifferenceExclusionHueSaturationColorLuminosityOpacity (0%)PDF/X Output IntentISO Coated v2 300% (ECI)Transparency Group Non Knockout (Blend Mode Normal), TBCS*: DeviceCMYKSource objectDeviceCMYK, using defined Blend ModeBackdropDeviceCMYK* TBCS = Transparency Blending Color Space04 Jan 2013 © Ghent Workgroup, www.gwg.org 16.1PDF/X-4GWG 16.1 - Transparency Basic Blend Modes (DeviceCMYK, Knockout)If an 'X' appears, rendering of Knockout Transparency Groups (a transparency effect) is not performed correctly.DarkenMultiplyColor BurnLightenScreenColor dodgeOverlaySoft LightHard LightDifferenceExclusionHueSaturationColorLuminosityOpacity (0%)How to...- Save the PDF out of Illustrator (CS5) using PDF/X-4 PDF-presets.- Place PDF in InDesign and export again as PDF/X-4 OR use Enfocus / pdftoolbox Preflight fix ‘Change Transparency Blending Space’ (to DeviceCMYK) Make sure the Color Settings (ID, ILL) and PDF/X OI (PDF) is set to ISO Coated v2 300% (ECI)PDF/X Output IntentISO Coated v2 300% (ECI)Transparency Group Knockout (Blend Mode Normal), TBCS*: DeviceCMYKSource objectDeviceCMYK, using defined Blend ModeBackdropDeviceCMYK* TBCS = Transparency Blending Color Space05 Nov 2012 © Ghent Workgroup, www.gwg.org 16.2PDF/X-4GWG 16.2 - Transparency Basic Blend Modes (DeviceCMYK, Isolated)If an 'X' appears, rendering of Isolated Transparency Groups (a transparency effect) is not performed correctly.DarkenMultiplyColor BurnLightenScreenColor dodgeOverlaySoft LightHard LightDifferenceExclusionHueSaturationColorLuminosityOpacity (0%)How to...- Save the PDF out of Illustrator (CS5) using PDF/X-4 PDF-presets.- Place PDF in InDesign and export again as PDF/X-4 OR use Enfocus / pdftoolbox Preflight fix ‘Change Transparency Blending Space’ (to DeviceCMYK) Make sure the Color Settings (ID, ILL) and PDF/X OI (PDF) is set to ISO Coated v2 300% (ECI)PDF/X Output IntentISO Coated v2 300% (ECI)Transparency Group Isolated (Blend Mode Normal), TBCS*: DeviceCMYKSource objectDeviceCMYK, using defined Blend ModeBackdropDeviceCMYK, using defined Blend Mode* TBCS = Transparency Blending Color Space11 Oct 201216.6© Ghent Workgroup, www.gwg.orgIf a solid black contour appears at the edges of the left image, the Image Softmask (a transparency effect) is not rendered correctly.GWG 16.6 – Image Softmasks (DeviceCMYK)PDF/X-4http://www.vigc.org/vigc50-xcs/http://www.vigc.org/vigc50-xcs/Reference ImageActual test object11 Oct 201216.8© Ghent Workgroup, www.gwg.orgEach of these transparency effects (vector soft masks) should match the reference images.GWG 16.8 – Vector Softmasks (part 1)Drop ShadowPDF/X-4Inner ShadowOuter GlowInner GlowBevel and EmbossReference ImagesActual test objects11 Oct 201216.9© Ghent Workgroup, www.gwg.orgEach of these transparency effects (vector soft masks) should match the reference images.GWG 16.9 – Vector Softmasks (part 2)PDF/X-4SatinBasic FeatherDirectional FeatherGradient FeatherReference ImagesActual test objects11 Oct 201216.10© Ghent Workgroup, www.gwg.orgEach of these transparency effects (Text Softmasks) should match the reference images.GWG 16.10 – Text Softmasks (part 1)Drop ShadowPDF/X-4Inner ShadowOuter GlowInner GlowBevel and EmbossReference ImagesActual test objectsABDC11 Oct 201216.11© Ghent Workgroup, www.gwg.orgEach of these transparency effects (Text Softmasks) should match the reference images.GWG 16.11 – Text Softmasks (part 2)PDF/X-4SatinBasic FeatherDirectional FeatherGradient FeatherReference ImagesActual test objectsFGIHFür die Zertifizierungen dürfen nur personalisierte Testformen verwendet werden!6354Farbqualität Die Farbqualität spielt bei diesem Test keine Rolle! Es geht nur um die korrekte Verarbeitung der PDF/X-Definitionen. Für den Druck der Sonderfarbe GWG Green (50% Cyan, 100% Yellow) kann eine beliebige Sonderfarbe verwendet werden. Die Texte in den Testelementen erscheinen zur besseren Visualisierung in allen Auszügen.Referenz/Dokumentation Die Datei PDFX-ready_Output-Test_30d_REFERENZ.pdf enthält (gerenderte) Referenzbilder der Composite -Seiten und der einzelnen Farbseparationen. Die Testelemente (inklusive Fehlerbehebungsmöglichkeiten) sind in der Datei PDFX-ready_Output-Test_30d_DOKUMENTATION.pdf ausführlich beschrieben. © 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)© 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)2321191722PDF/X-4TestPDFX-ready Output-Test V3.0242018Cyan – Magenta – Yellow – BlackV3.01 / 10.09.13 Seite 3 / 4Type1 PostScript: Expected result: TrueType: Expected result: CID (Type1): äöüÄÖÜáâàfifl©®@ÐŒÆØæƒÿ‡‰þ½ð (WarnockPro-BoldIt)Expected result: CID (TrueType): äöüÄÖÜáâàfifl©®@ÐŒÆØæƒÿ‡‰þ½ð (PalatinoLinotype BoldItalic)Expected result: Multiple Master: (ExPontoMM)Expected result: (ExPontoMM) Type 3 Vector: Expected result: Type 3 Bitmap: (T10)Expected result: (T10) GWG 9.0 - Font Support03 Nov 20059.0Ghent PDF Workgroup © www.gwg.org : äöüÄÖÜáâàfi fl©®@ÐŒÆØæƒÿ‡‰þ½ð (NewCenturySchlbk Italic) äöüÄÖÜáâàfi fl ©®@ÐŒÆØæƒÿ‡‰þ½ð (BookAntiqua-BoldItalic)dit is een multiple master ex ponto mmdit is een multiple master ex ponto mmQXOOIlOOWHLQQHJDWLYHU=DKOXQJVVWURPDQ,QGHQ-DKUHQHLQVELVIQIäöüÄÖÜáâàfifl©®@ŒÆØæƒÿ‡‰$£çABCD…XYZ(T1 / Garamond Bold)14 jan 20129.1© Ghent Workgroup, www.gwg.orgIf the text in the line above does not look like the image in the line below an error in the rendering of the font occured. GWG 9.1 – OpenType Font Support Warnock Pro Semibold – OpenType (Type 1)Arial Unicode MS – OpenType (TrueType)äöüÄÖÜáâàfi fl©®@OEÆØæƒÿ‡‰PDF/X-4äöüÄÖÜáâàfi fl©®@OEÆØæƒÿ‡‰ Ghent PDF Workgroup © www.gwg.org GWG 5.1 - Font subset and substitution11 Nov 20125.1- If all characters are correct and appear in the right order, the subset fonts have been processed correctly.- If some characters do not appear or display in the wrong order, incorrect handling of subset fonts has occurred.subsetted fontexpected result1234545678Placed EPS-file n°1(VVLNKX+Myriad-Roman)Placed EPS-file n°2(VVLNKX+Myriad-Roman)Ghent PDF Workgroup © www.gwg.org GWG 5.2 - Font subset and substitution11 Nov 20125.2- If all characters are correct and appear in the right order, the subset fonts have been processed correctly.- If some characters do not appear or display in the wrong order, incorrect handling of subset fonts has occurred.subsetted fontexpected result1234545678Placed EPS-file n°1(FEPTUI+Myriad-Roman)Placed EPS-file n°2(PGNBEO+Myriad-Roman)⊗GWG 5.0 - Font Substitution16 Nov 20055.0Ghent PDF Workgroup © www.gwg.orgIf a check mark appears above, then the embedded font is used (correct behavior). If an other character appears, the embedded font was substituted with a Symbol font installed in the system (host or RIP).28 Jan 2012 © Ghent Workgroup, www.gwg.org 18.1GWG 18.1 - 16Bit Image (DeviceCMYK)No “X” must be visible when rendered correctly.Reference image (cross): 8Bit, ZIPTest image: 16 Bit, ZIP© bvdm, www.roman16.comPDF/X-419 Mar 2012 © Ghent Workgroup, www.gwg.org 17.0GWG 17.0 - JPEG2000 compression (DeviceCMYK)PDF/X-4How to...- Make two PDF’s: 1. using PDF/X-4 presets (name it xxx_DeviceCMYK.pdf) 2. PDF1.8 with NO compression (name it xxx_ICCBased.pdf)- Run ‘DH_Downsample/compress color images using JPEG2000 compression’ preflight profile in Acrobat- Delete ‘ICCBased’ element in ‘xxx_DeviceCMYK.pdf’ and replace with ‘ICCBased’ element from ‘xxx.ICCBased.pdf’- Save ‘xxx_DeviceCMYK.pdf’ as a new file, e.g. ‘xxx.CMYK_x4.pdf’.No “X” must be visible when rendered correctly. 03 July 2012 © Ghent Workgroup, www.gwg.org 17.3GWG 17.3 - JBIG2 compressionPDF/X-4BlackWhiteHow to...- Export this file to PDF- Run the ‘DH_compress monochrome, JBIG2’ profile in Acrobat- Save fileNo “X” must be visible when rendered correctly. Für die Zertifizierungen dürfen nur personalisierte Testformen verwendet werden!PDF/X-4Test3546PDFX-ready Output-Test V3.0Rechtliche Bestimmungen Die nicht-personalisierte Testdatei darf frei verwendet und weitergegeben werden. Aber sie darf nicht verändert wer-den! Die rechtlichen Bestimmungen in der ReadMe-Datei der Ghent PDF Output Suite 4.0 sind zu beachten. Copyright Das Copyright an diesen Seiten gehört der Ghent PDF Workgroup (http://ww.gwg.org) und PDFX-ready Schweiz (http://www.pdfx-ready.ch). Ausserdem gelten die allge-meinen Geschäftsbedingungen (AGB) von PDFX-ready. © 2013 Ghent PDF Workgroup (http://www.gwg.org) und PDFX-ready (http://www.pdfx-ready.ch)3026312927253228Fragen und Anregungen: Bitte senden Sie Ihre Fragen und Anregungen an info@pdfx-ready.ch.Cyan – Magenta – Yellow – Black – GWG Green (50% Cyan / 100% Yellow)Seite 4 / 4V3.01 / 10.09.13 abcdefghijGWG 2.0 - Spot to CMYK Overprintthis row:cmykover spotthis row:spotover cmykfontvectorimagemaskshadingfontvectorimagemaskshading27 Nov 2005 Ghent PDF Workgroup© www.gwg.org 2.0 GWG 4.1 - White Overprint Mode8 Apr 20084.1Ghent PDF Workgroup © www.gwg.orgSpot Whitealmost WhiteIf a visible X appears, the “Overprinting White” is not handled.Rect 75 / 5/ 100 / 0Cross (overpr) 0% GWG GreenCross (OP) .2 / .2 / .2 / 0Cross (OP) 15 /100 / 100 / 0Rect .2 / .2 / .2 / 10ababcdefghijkl 3.0Ghent Workgroup © www.gwg.org GWG 3.0 - Gray Overprint PatchOPM0a 50% K over spotb 50% gray over spotc 50% sep. black over spotd 50% K over CMYKe 50% gray over CMYKf 50% sep. black over CMYKOPM1 50% K over spot g50% gray over spot h 50% sep. black over spot I 50% K over CMYK j 50% gray over CMYK k50% sep. black over CMYK l OPM0OPM1 02 Jan 2013abcdefghijkl4.Ghent PDF Workgroup © www.gwg.orgGWG 4.0.1 - White Overprint PatchOPM0a CMYK over spotb Gray over spotc Sep. black over spotd CMYK over CMYKe Gray over CMYKf Sep. black over CMYKOPM1 CMYK over spot g Gray over spot h Sep. black over spot I CMYK over CMYK j Gray over CMYK k sep. black over CMYK l OPM0OPM1Nov 20060.110 GWG 3.1 - Gray Image Overprint (CMYK over Spot)21 Jan 20133.1Ghent Workgroup © www.gwg.orgDuring flattening (in InDesign or Acrobat) of drop shadows over spot colors overprinting grayscale images with a white background are created.ReferenceCorrectWrongReferenceOverprinting must be honored for the output.OverprintCMYKKnockoutSpotVectorText bigText 6ptGWG 12.0 - White Overprint/Knockout29 Aug 201312.0Ghent Workgroup © www.gwg.orgx xx xx xx xx xx xx xx xx xx xx xx xx xxx xx xx xx xx xx xx xx xx xx xx xx xx xxx xx xx xx xx xx xx xx xx xx xx xx xx xxx xx xx xx xx xx xx xx xx xx xx xx xx xxVectorText bigText 6ptIf filled X appear the Overprint settings were not respected.If filled X appear the Knockout settings were not respected.GWG 8.1 - DeviceN Support (5 colors)20 Jan 20138.1Ghent PDF Workgroup © www.gwg.orgDuotone (should appear only in Black and GWG Green separations)Colorized TIFF (should appear only in GWG Green separation)Spot color gradient (should appear only in GWG Green and Cyan separations)If a appears instead of the green checkmarks then DeviceN is not supported!Ein Betrieb kann mit der PDFX-ready Output-Zertifizierung be-weisen, dass er mit seinem Workflow in der Lage ist, eine gültige PDF/X- 4-Datei korrekt zu verarbeiten und auszugeben. Für die PDFX-ready Output-Zertifizierung muss eine personalisierte Version dieser Testform verwendet werden. PDFX-ready-Mitglieder können diese beim PDFX-ready-Sekre-tariat (info@pdfx-ready.ch) oder auf http://www.pdfx-ready.ch/index.php?show=380 anfordern.PDFX-ready Output-Zertifizierung© PDFX-ready Schweiz, http://www.pdfx-ready.ch05 Oct 20120.0Für die Zertifizierungen dürfen nur personalisierte Testformen verwendet werden! \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Old Gutnish Internet Explorer.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/Old Gutnish Internet Explorer.txt new file mode 100644 index 000000000..ee0c87f71 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/Old Gutnish Internet Explorer.txt @@ -0,0 +1 @@ +Old GutnishOld Gutnish was the dialect of Old Norse that was spoken on the Baltic island of Gotland. It shows sufficient differences from the Old West Norse and Old East Norsedialects that it is considered to be a separate branch. Gutnish is still spoken in some parts of Gotland and on the adjoining island of Fårö.The root Gut is identical to Goth, and it is often remarked that the language has similarities with the Gothic language. These similarities have led scholars such as Elias Wessén and Dietrich Hofmann to suggest that it is most closely related to Gothic. The best known example of such a similarity is that Gothic and Gutnish called both adult and young sheep lamb.The Old Norse diphthong au (e.g. auga "eye") remained in Old Gutnish and Old West Norse, while in Old East Norse – except for peripheral dialects – it evolved into the monophthong ǿ, i.e. a long version of ø. Likewise the diphthong ai in bain (bone) remained in Old Gutnish while it in Old West Norse became ei as in bein and in Old East Norse it became é (bén). Whereas Old West Norse had the ey diphthong and Old East Norse evolved the monophthong ǿ) Old Gutnish had oy.Proto-GermanicOld GutnishOld West NorseOld East Norse*augô (eye)augaaugaauga > ǿga*bainą (bone)bainbeinbæin > bén*hauzijaną (to hear)hoyraheyrahøyra > hǿraMost of the corpus of Old Gutnish is found in the Gutasaga from the 13th century.Citation:Þissi þieluar hafþi ann sun sum hit hafþi. En hafþa cuna hit huita stierna þaun tu bygþu fyrsti agutlandi fyrstu nat sum þaun saman suafu þa droymdi hennj draumbr. So sum þrir ormar warin slungnir saman j barmj hennar Oc þytti hennj sum þair scriþin yr barmi hennar. þinna draum segþi han firi hasþa bonda sinum hann riaþ dravm þinna so. Alt ir baugum bundit bo land al þitta warþa oc faum þria syni aiga. þaim gaf hann namn allum o fydum. guti al The approximate extent of Old Norse and related languages in the early 10th century: Old West Norse dialectOld East Norse dialectOld GutnishOld EnglishCrimean Gothic Other Germanic languages with which Old Norse still retained some mutual intelligibilityLanguage samplePage 1 of 3Old Gutnish -Wikipedia10/01/2018https://en.wikipedia.org/wiki/Old_Gutnishgutland aigha graipr al annar haita Oc gunfiaun þriþi. þair sciptu siþan gutlandi i þria þriþiunga. So at graipr þann elzti laut norþasta þriþiung oc guti miþal þriþiung En gunfiaun þann yngsti laut sunnarsta. siþan af þissum þrim aucaþis fulc j gutlandi so mikit um langan tima at land elptj þaim ai alla fyþa þa lutaþu þair bort af landi huert þriþia þiauþ so at alt sculdu þair aiga oc miþ sir bort hafa sum þair vfan iorþar attu.Standardised Old Gutnish:Þissi Þieluar hafþi ann sun sum hit Hafþi. En Hafþa kuna hit Huita Stierna. Þaun tu bygþu fyrsti a Gutlandi. Fyrstu nat sum þaun saman suafu þa droymdi henni draumbr. So sum þrir ormar varin slungnir saman i barmi hennar ok þytti henni sum þair skriþin yr barmi hennar. Þinna draum segþi han firi Hafþa, bonda sinum. Hann riaþ draum þinna so: Alt ir baugum bundit, bo land al þitta varþa ok faum þria syni aiga. Þaim gaf hann namn allum ofydum. Guti al Gutland aiga, Graipr al annar haita ok Gunfiaun þriþi. Þair skiptu siþan Gutlandi i þria þriþiunga so at Graipr þann eldsti laut norþasta þriþiung ok Guti miþal þriþiung en Gunfiaun þann yngsti laut sunnarasta. Siþan af þissum þrim aukaþis fulk i Gutlandi so mikit um langan tima at land elpti þaim ai alla fyþa. Þa lutaþu þair bort af landi huert þriþia þiauþ so at alt skuldu þair aiga ok miþ sir bort hafa sum þair ufan iorþar attu.Employing normalised Old Norse orthography:Þissi Þjelvar hafði ann sun sum hít Hafði. En Hafða kuna hít Hvítastjerna. Þaun tú byggðu fyrsti á Gutlandi. Fyrstu nátt sum þaun saman sváfu þá droymdi henni draumr; só sum þrír ormar varin slungnir saman í barmi hennar, ok þýtti henni sum þair skriðin ýr barmi hennar. Þinna draum segði han firi Hafða bónda sínum. Hann raið draum þinna só: "Alt ir baugum bundit, bóland al þitta varða uk fáum þría syni aiga." Þaim gaf hann namn, allum ófýddum; Guti, al Gutland aiga; Graipr, al annar haita; ok Gunnfjaun þriði. Þair skiptu síðan Gutlandi í þría þriðjunga, só at Graipr þann eldsti laut norðasta þriðjung, ok Guti miðal þriðjung, en Gunnfjaun þann yngsti laut sunnarsta. Síðan, af þissum þrim aukaðis fulk í Gutlandi sum mikit um langan tíma at land elpti þaim ai alla fýða. Þá lutaðu þair bort af landi hvert þriðja þjauð só at alt skuldu þair aiga ok mið sír bort hafa sum þair ufan jorðar áttu.Translation: in Icelandic:Son hann Þjálfi átti sem hét Hafði. Og kona Hafða hét Hvítastjarna. þau tvö byggðu fyrst manna á Gotlandi. Fyrstu nótt sem þau þar saman sváfu þá dreymdi hana draum; sá hún þrjá orma vafðir saman í barmi hennar, og þótti henni sem þeir skriða niður barm hennar. Þennan draum sagði hún Hafða bónda sínum. Hann réð draum þann svo: "Allt er baugum bundið og verður allt land þitt búið og munum við þrjá syni eiga." Þeim gaf hann nöfn ófæddum, Goti sem Gotland á að eiga; Greipur sem annar hét; og Gunnfjón sá þriðji. Þeir skiptu síðan Gotlandi í þrjá þriðjunga, þá fékk Greipur sá elsti norður þriðjunginn, og Goti miðju þriðjunginn, en Gunnfjón sá yngsti fékk suður þriðjunginn. Seinna, af þessum þremur Page 2 of 3Old Gutnish -Wikipedia10/01/2018https://en.wikipedia.org/wiki/Old_Gutnishjókst eftir langan tíma svo fólk í Gotlandi það mikið að landið gat ekki öllum veitt fæði. Þá létu þeir fara burt af landi þriðja hvern þegn, og allt máttu þau eiga og með sér burt hafa sem ofanjarðar áttu.Translation:This Thielvar had a son called Hafthi. And Hafthi's wife was called Hvitstjarna. Those two were the first to settle on Gotland. When they slept on the island for the first night, she dreamed that three snakes lay in her lap, and she thought they were sliding off her lap. She told this to Hafthi. He interpreted her dream and said: "Everything is bound with bangles, this island will be inhabited, and you will bear three sons." Although, they were not yet born, he named them Guti, who would own the island, Graip and Gunfiaun. The sons divided the island into three regions, and Graip, who was the eldest, took the north, Guti the middle, and Gunfjaun, who was the youngest, took the southern third. After a long time, their descendants became so numerous that the island could not support all of them. They drew lots and every third islander had to leave. They could keep everything they owned but the land.◾Nationalencyklopedin◾Christine Peel. "Guta Saga - The History of the Gotlanders," Viking Society for Northern Research Text Series. Vol. XII. Viking Society for Northern Research, University College of London (1999).Retrieved from "https://en.wikipedia.org/w/index.php?title=Old_Gutnish&oldid=797888377" This page was last edited on 29 August 2017, at 19:15.Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.ReferencesPage 3 of 3Old Gutnish -Wikipedia10/01/2018https://en.wikipedia.org/wiki/Old_Gutnish \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Type0 Font.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/Type0 Font.txt new file mode 100644 index 000000000..15686c0f7 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/Type0 Font.txt @@ -0,0 +1 @@ +TypeWeekly newspaperEditorJoe StuverFoundedOctober, 1918 (asthe BroadusIndependent), 1935(as the PowderRiver CountyExaminer), and1965 (as thePowder RiverExaminer)Headquarters119 1/2 N. ParkAve.Broadus, MT 59317United StatesPowder River ExaminerPowder River ExaminerThe Powder River Examiner, originally established in October, 1918 asthe Broadus Independent, is the only newspaper printed in Powder RiverCounty, Montana, and is located in the county seat of Broadus.The Broadus Independent was first published in Broadus, Montana inOctober, 1918, and continued until February, 1919.From March 6, 1919 until April 17, 1919, the paper was published inOlive, Montana as the Olive Branch.The Broadus Independent was published weekly from April 24, 1919until 1935.The Powder River County Examiner replaced the BroadusIndependent in 1935, beginning publication and continuing weekly until1965.In 1965 the newspaper's name was shortened to Powder RiverExaminer, and remains that today.Broadus Independent, Broadus, Montana, October, 1918-February, 1919.Olive Branch, Olive, Montana, March 6, 1919 – April 17, 1919.Broadus Independent, Broadus, Montana, April 24, 1919 – 1935.Powder River County Examiner, Broadus, Montana, 1935-1965.Powder River Examiner, Broadus, Montana, 1965-current.Joe Stuver, (current editor)Retrieved from "https://en.wikipedia.org/w/index.php?title=Powder_River_Examiner&oldid=747264669"This page was last edited on 1 November 2016, at 11:53.Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By usingthis site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the WikimediaFoundation, Inc., a non-profit organization.HistoryPreceding TitlesNotable contributorsPowder River Examiner - Wikipediahttps://en.wikipedia.org/wiki/Powder_River_Examiner1 of 130/03/2018, 03:50 \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt new file mode 100644 index 000000000..5633df3ac --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt @@ -0,0 +1 @@ +Tell us about your PDF experience.AI apps for .NET developersLearn to build AI apps with .NET. Browse sample code, tutorials, quickstarts, conceptual articles,and more.Get startedeOVERVIEWDevelop .NET apps with AI featuresMicrosoft.Extensions.AI librariesbGET STARTEDConnect to and prompt an AI modelBuild an Azure AI chat appGenerate images using Azure AIEssential conceptspCONCEPTHow generative AI and LLMs workUnderstand tokensPreserve semantic meaning with embeddingsSemantic search with vector databasesPrompt engineeringEvaluation librariesCommon taskscHOW-TO GUIDEAuthenticate App Service to Azure OpenAIAuthenticate App Service to a vector databaseUse Redis with the Semantic Kernel SDKUse custom and local AI models with the Semantic Kernel SDKWork with content filteringTutorialsgTUTORIALScale Azure OpenAI with Azure Container Apps.NET enterprise chat sample using RAGImplement RAG using vector searchEvaluate a model's responseTraininggTUTORIALFundamentals of Azure OpenAI ServiceGenerate conversations Azure OpenAI completions.NET enterprise chat sample using RAGDevelop AI agents using Azure OpenAIAPI referenceiREFERENCEChatClientBuilderIChatClientIEmbeddingGeneratorDevelop .NET apps with AI featuresArticle•05/02/2025With .NET, you can use artificial intelligence (AI) to automate and accomplish complex tasks inyour applications using the tools, platforms, and services that are familiar to you.Millions of developers use .NET to create applications that run on the web, on mobile anddesktop devices, or in the cloud. By using .NET to integrate AI into your applications, you cantake advantage of all that .NET has to offer:A unified story for building web UIs, APIs, and applications.Supported on Windows, macOS, and Linux.Is open-source and community-focused.Runs on top of the most popular web servers and cloud platforms.Provides powerful tooling to edit, debug, test, and deploy.The opportunities with AI are near endless. Here are a few examples of solutions you can buildusing AI in your .NET applications:Language processing: Create virtual agents or chatbots to talk with your data andgenerate content and images.Computer vision: Identify objects in an object or video.Audio generation: Use synthesized voices to interact with customers.Classification: Label the severity of a customer-reported issue.Task automation: Automatically perform the next step in a workflow as tasks arecompleted.We recommend the following sequence of tutorials and articles for an introduction todeveloping applications with AI and .NET:ScenarioTutorialCreate a chat applicationBuild an Azure AI chat app with .NETWhy choose .NET to build AI apps?What can you build with AI and .NET?Recommended learning pathノExpand tableScenarioTutorialSummarize textSummarize text using Azure AI chat app with .NETChat with your dataGet insight about your data from an .NET Azure AI chat appCall .NET functions with AIExtend Azure AI using tools and execute a local function with .NETGenerate imagesGenerate images using Azure AI with .NETTrain your own modelML.NET tutorialBrowse the table of contents to learn more about the core concepts, starting with Howgenerative AI and LLMs work.Quickstart: Build an Azure AI chat app with .NETVideo series: Machine Learning and AI with .NETNext stepsConnect to and prompt an AI modelArticle•05/18/2025In this quickstart, you learn how to create a .NET console chat app to connect to and promptan OpenAI or Azure OpenAI model. The app uses the Microsoft.Extensions.AI library so you canwrite code using AI abstractions rather than a specific SDK. AI abstractions enable you tochange the underlying AI model with minimal code changes..NET 8.0 SDK or higher - Install the .NET 8.0 SDK.An API key from OpenAI so you can run this sample.Complete the following steps to create a .NET console app to connect to an AI model.1. In an empty directory on your computer, use the dotnet new command to create a newconsole app:.NET CLI2. Change directory into the app folder:.NET CLI3. Install the required packages:BashPrerequisites7 NoteYou can also use Semantic Kernel to accomplish the tasks in this article. Semantic Kernel isa lightweight, open-source SDK that lets you build AI agents and integrate the latest AImodels into your .NET apps.Create the appdotnet new console -o ExtensionsAIcd ExtensionsAI4. Open the app in Visual Studio Code or your editor of choice.1. Navigate to the root of your .NET project from a terminal or command prompt.2. Run the following commands to configure your OpenAI API key as a secret for the sampleapp:BashThe app uses the Microsoft.Extensions.AI package to send and receive requests to the AImodel.1. Copy the benefits.md file to your project directory. Configure the project to copy thisfile to the output directory. If you're using Visual Studio, right-click on the file in SolutionExplorer, select Properties, and then set Copy to Output Directory to Copy if newer.2. In the Program.cs file, add the following code to connect and authenticate to the AImodel.C#dotnet add package OpenAIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretsConfigure the appdotnet user-secrets initdotnet user-secrets set OpenAIKey dotnet user-secrets set ModelName Add the app codeusing Microsoft.Extensions.AI;using Microsoft.Extensions.Configuration;using OpenAI;IConfigurationRoot config = new ConfigurationBuilder() .AddUserSecrets() .Build();string? model = config["ModelName"];string? key = config["OpenAIKey"];3. Add code to read the benefits.md file content and then create a prompt for the model.The prompt instructs the model to summarize the file's text content in 20 words or less.C#4. Call the GetResponseAsync method to send the prompt to the model to generate aresponse.C#5. Run the app:.NET CLIThe app prints out the completion response from the AI model. Customize the textcontent of the benefits.md file or the length of the summary to see the differences in theresponses.Quickstart - Build an AI chat app with .NETGenerate text and conversations with .NET and Azure OpenAI CompletionsIChatClient client = new OpenAIClient(key).GetChatClient(model).AsIChatClient();string text = File.ReadAllText("benefits.md");string prompt = $""" Summarize the the following text in 20 words or less: {text} """;// Submit the prompt and print out the response.ChatResponse response = await client.GetResponseAsync( prompt, new ChatOptions { MaxOutputTokens = 400 });Console.WriteLine(response);dotnet runNext steps.NET + AI ecosystem tools and SDKsArticle•05/29/2025The .NET ecosystem provides many powerful tools, libraries, and services to develop AIapplications. .NET supports both cloud and local AI model connections, many different SDKs forvarious AI and vector database services, and other tools to help you build intelligent apps ofvarying scope and complexity.Microsoft.Extensions.AI is a set of core .NET libraries that provide a unified layer of C#abstractions for interacting with AI services, such as small and large language models (SLMs andLLMs), embeddings, and middleware. These APIs were created in collaboration with developersacross the .NET ecosystem, including Semantic Kernel. The low-level APIs, such as IChatClientand IEmbeddingGenerator, were extracted from Semantic Kernel andmoved into the Microsoft.Extensions.AI namespace.Microsoft.Extensions.AI provides abstractions that can be implemented by various services, alladhering to the same core concepts. This library is not intended to provide APIs tailored to anyspecific provider's services. The goal of Microsoft.Extensions.AI is to act as a unifying layerwithin the .NET ecosystem, enabling developers to choose their preferred frameworks andlibraries while ensuring seamless integration and collaboration across the ecosystem.If you just want to use the low-level services, such as IChatClient andIEmbeddingGenerator, you can reference theMicrosoft.Extensions.AI.Abstractions package directly from your app. However, if you want touse higher-level, more opinionated approaches to AI, then you should use Semantic Kernel.Semantic Kernel, which has a dependency on the Microsoft.Extensions.AI.Abstractionspackage, is an open-source library that enables AI integration and orchestration capabilities inyour .NET apps. Its connectors provides concrete implementations of IChatClient and) ImportantNot all of the SDKs and services presented in this article are maintained by Microsoft.When considering an SDK, make sure to evaluate its quality, licensing, support, andcompatibility to ensure they meet your requirements.Microsoft.Extensions.AI librariesSemantic Kernel for .NETIEmbeddingGenerator for different services, including OpenAI, AmazonBedrock, and Google Gemini.The Semantic Kernel SDK is generally the recommended AI orchestration tool for .NET apps thatuse one or more AI services in combination with other APIs or web services, data stores, andcustom code. Semantic Kernel benefits enterprise developers in the following ways:Streamlines integration of AI capabilities into existing applications to enable a cohesivesolution for enterprise products.Minimizes the learning curve of working with different AI models or services by providingabstractions that reduce complexity.Improves reliability by reducing the unpredictable behavior of prompts and responsesfrom AI models. You can fine-tune prompts and plan tasks to create a controlled andpredictable user experience.For more information, see the Semantic Kernel documentation.Many different SDKs are available to build .NET apps with AI capabilities depending on thetarget platform or AI model. OpenAI models offer powerful generative AI capabilities, whileother Azure AI Services provide intelligent solutions for a variety of specific scenarios.NuGet packageSupported modelsMaintainer orvendorDocumentationMicrosoft.SemanticKernelOpenAI modelsAzure OpenAIsupported modelsSemantic Kernel(Microsoft)Semantic KerneldocumentationAzure OpenAI SDKAzure OpenAIsupported modelsAzure SDK for .NET(Microsoft)Azure OpenAI servicesdocumentationOpenAI SDKOpenAI supportedmodelsOpenAI SDK for.NET (OpenAI)OpenAI servicesdocumentationAzure offers many other AI services to build specific application capabilities and workflows.Most of these services provide a .NET SDK to integrate their functionality into custom apps..NET SDKs for building AI apps.NET SDKs for OpenAI modelsノExpand table.NET SDKs for Azure AI ServicesSome of the most commonly used services are shown in the following table. For a complete listof available services and learning resources, see the Azure AI Services documentation.ServiceDescriptionAzure AI SearchBring AI-powered cloud search to your mobile and web apps.Azure AI Content SafetyDetect unwanted or offensive content.Azure AI DocumentIntelligenceTurn documents into intelligent data-driven solutions.Azure AI LanguageBuild apps with industry-leading natural language understandingcapabilities.Azure AI SpeechSpeech to text, text to speech, translation, and speaker recognition.Azure AI TranslatorAI-powered translation technology with support for more than 100languages and dialects.Azure AI VisionAnalyze content in images and videos..NET apps can also connect to local AI models for many different development scenarios.Semantic Kernel is the recommended tool to connect to local models using .NET. SemanticKernel can connect to many different models hosted across a variety of platforms and abstractsaway lower-level implementation details.For example, you can use Ollama to connect to local AI models with .NET, including severalsmall language models (SLMs) developed by Microsoft:ModelDescriptionphi3 modelsA family of powerful SLMs with groundbreaking performance at low cost and low latency.orca modelsResearch models in tasks such as reasoning over user-provided data, readingcomprehension, math problem solving, and text summarization.ノExpand tableDevelop with local AI modelsノExpand table7 NoteThe preceding SLMs can also be hosted on other services, such as Azure.AI applications often use data vector databases and services to improve relevancy and providecustomized functionality. Many of these services provide a native SDK for .NET, while othersoffer a REST service you can connect to through custom code. Semantic Kernel provides anextensible component model that enables you to use different vector stores without needing tolearn each SDK.Semantic Kernel provides connectors for the following vector databases and services:VectorserviceSemantic Kernel connector.NET SDKAzure AISearchMicrosoft.SemanticKernel.Connectors.AzureAISearchAzure.Search.DocumentsAzureCosmos DBfor NoSQLMicrosoft.SemanticKernel.Connectors.AzureCosmosDBNoSQLMicrosoft.Azure.CosmosAzureCosmos DBforMongoDBMicrosoft.SemanticKernel.Connectors.AzureCosmosDBMongoDBMongoDb.DriverAzurePostgreSQLServerMicrosoft.SemanticKernel.Connectors.PostgresNpgsqlAzure SQLDatabaseMicrosoft.SemanticKernel.Connectors.SqlServerMicrosoft.Data.SqlClientChromaMicrosoft.SemanticKernel.Connectors.ChromaNADuckDBMicrosoft.SemanticKernel.Connectors.DuckDBDuckDB.NET.Data.FullMilvusMicrosoft.SemanticKernel.Connectors.MilvusMilvus.ClientMongoDBAtlasVectorSearchMicrosoft.SemanticKernel.Connectors.MongoDBMongoDb.DriverPineconeMicrosoft.SemanticKernel.Connectors.PineconeREST APIPostgresMicrosoft.SemanticKernel.Connectors.PostgresNpgsqlQdrantMicrosoft.SemanticKernel.Connectors.QdrantQdrant.ClientConnect to vector databases and servicesノExpand tableVectorserviceSemantic Kernel connector.NET SDKRedisMicrosoft.SemanticKernel.Connectors.RedisStackExchange.RedisWeaviateMicrosoft.SemanticKernel.Connectors.WeaviateREST APITo discover .NET SDK and API support, visit the documentation for each respective service.What is Semantic Kernel?Quickstart - Summarize text using Azure AI chat app with .NETNext stepsMicrosoft.Extensions.AI libraries06/23/2025.NET developers need to integrate and interact with a growing variety of artificial intelligence(AI) services in their apps. The Microsoft.Extensions.AI libraries provide a unified approach forrepresenting generative AI components, and enable seamless integration and interoperabilitywith various AI services. This article introduces the libraries and provides in-depth usageexamples to help you get started.The 📦 Microsoft.Extensions.AI.Abstractions package provides the core exchange types,including IChatClient and IEmbeddingGenerator. Any .NET library thatprovides an LLM client can implement the IChatClient interface to enable seamlessintegration with consuming code.The 📦 Microsoft.Extensions.AI package has an implicit dependency on theMicrosoft.Extensions.AI.Abstractions package. This package enables you to easily integratecomponents such as automatic function tool invocation, telemetry, and caching into yourapplications using familiar dependency injection and middleware patterns. For example, itprovides the UseOpenTelemetry(ChatClientBuilder, ILoggerFactory, String,Action) extension method, which adds OpenTelemetry support tothe chat client pipeline.Libraries that provide implementations of the abstractions typically reference onlyMicrosoft.Extensions.AI.Abstractions.To also have access to higher-level utilities for working with generative AI components,reference the Microsoft.Extensions.AI package instead (which itself referencesMicrosoft.Extensions.AI.Abstractions). Most consuming applications and services shouldreference the Microsoft.Extensions.AI package along with one or more libraries that provideconcrete implementations of the abstractions.For information about how to install NuGet packages, see dotnet package add or Managepackage dependencies in .NET applications.The packagesWhich package to referenceInstall the packagesThe following subsections show specific IChatClient usage examples:Request a chat responseRequest a streaming chat responseTool callingCache responsesUse telemetryProvide optionsPipelines of functionalityCustom IChatClient middlewareDependency injectionStateless vs. stateful clientsThe following sections show specific IEmbeddingGenerator usage examples:Create embeddingsPipelines of functionalityThe IChatClient interface defines a client abstraction responsible for interacting with AI servicesthat provide chat capabilities. It includes methods for sending and receiving messages withmulti-modal content (such as text, images, and audio), either as a complete set or streamedincrementally. Additionally, it allows for retrieving strongly typed services provided by the clientor its underlying services..NET libraries that provide clients for language models and services can provide animplementation of the IChatClient interface. Any consumers of the interface are then able tointeroperate seamlessly with these models and services via the abstractions. You can see asimple implementation at Sample implementations of IChatClient and IEmbeddingGenerator.With an instance of IChatClient, you can call the IChatClient.GetResponseAsync method to senda request and get a response. The request is composed of one or more messages, each ofwhich is composed of one or more pieces of content. Accelerator methods exist to simplifycommon cases, such as constructing a request for a single piece of text content.C#API usage examplesThe IChatClient interfaceRequest a chat responseThe core IChatClient.GetResponseAsync method accepts a list of messages. This list representsthe history of all messages that are part of the conversation.C#The ChatResponse that's returned from GetResponseAsync exposes a list of ChatMessageinstances that represent one or more messages generated as part of the operation. In commoncases, there is only one response message, but in some situations, there can be multiplemessages. The message list is ordered, such that the last message in the list represents the finalmessage to the request. To provide all of those response messages back to the service in asubsequent request, you can add the messages from the response back into the messages list.C#The inputs to IChatClient.GetStreamingResponseAsync are identical to those ofGetResponseAsync. However, rather than returning the complete response as part of ausing Microsoft.Extensions.AI;using OllamaSharp;IChatClient client = new OllamaApiClient( new Uri("http://localhost:11434/"), "phi3:mini");Console.WriteLine(await client.GetResponseAsync("What is AI?"));Console.WriteLine(await client.GetResponseAsync([ new(ChatRole.System, "You are a helpful AI assistant"), new(ChatRole.User, "What is AI?"),]));List history = [];while (true){ Console.Write("Q: "); history.Add(new(ChatRole.User, Console.ReadLine())); ChatResponse response = await client.GetResponseAsync(history); Console.WriteLine(response); history.AddMessages(response);}Request a streaming chat responseChatResponse object, the method returns an IAsyncEnumerable where T isChatResponseUpdate, providing a stream of updates that collectively form the single response.C#As with GetResponseAsync, you can add the updates fromIChatClient.GetStreamingResponseAsync back into the messages list. Because the updates areindividual pieces of a response, you can use helpers likeToChatResponse(IEnumerable) to compose one or more updates backinto a single ChatResponse instance.Helpers like AddMessages compose a ChatResponse and then extract the composed messagesfrom the response and add them to a list.C#await foreach (ChatResponseUpdate update in client.GetStreamingResponseAsync("What is AI?")){ Console.Write(update);} TipStreaming APIs are nearly synonymous with AI user experiences. C# enables compellingscenarios with its IAsyncEnumerable support, allowing for a natural and efficient way tostream data.List chatHistory = [];while (true){ Console.Write("Q: "); chatHistory.Add(new(ChatRole.User, Console.ReadLine())); List updates = []; await foreach (ChatResponseUpdate update in client.GetStreamingResponseAsync(history)) { Console.Write(update); updates.Add(update); } Console.WriteLine(); chatHistory.AddMessages(updates);}Some models and services support tool calling. To gather additional information, you canconfigure the ChatOptions with information about tools (usually .NET methods) that the modelcan request the client to invoke. Instead of sending a final response, the model requests afunction invocation with specific arguments. The client then invokes the function and sends theresults back to the model with the conversation history. TheMicrosoft.Extensions.AI.Abstractions library includes abstractions for various messagecontent types, including function call requests and results. While IChatClient consumers caninteract with this content directly, Microsoft.Extensions.AI provides helpers that can enableautomatically invoking the tools in response to corresponding requests. TheMicrosoft.Extensions.AI.Abstractions and Microsoft.Extensions.AI libraries provide thefollowing types:AIFunction: Represents a function that can be described to an AI model and invoked.AIFunctionFactory: Provides factory methods for creating AIFunction instances thatrepresent .NET methods.FunctionInvokingChatClient: Wraps an IChatClient as another IChatClient that addsautomatic function-invocation capabilities.The following example demonstrates a random function invocation (this example depends onthe 📦 OllamaSharp NuGet package):C#Tool callingusing Microsoft.Extensions.AI;using OllamaSharp;string GetCurrentWeather() => Random.Shared.NextDouble() > 0.5 ? "It's sunny" : "It's raining";IChatClient client = new OllamaApiClient(new Uri("http://localhost:11434"), "llama3.1");client = ChatClientBuilderChatClientExtensions .AsBuilder(client) .UseFunctionInvocation() .Build();ChatOptions options = new() { Tools = [AIFunctionFactory.Create(GetCurrentWeather)] };var response = client.GetStreamingResponseAsync("Should I wear a rain coat?", options);await foreach (var update in response){The preceding code:Defines a function named GetCurrentWeather that returns a random weather forecast.Instantiates a ChatClientBuilder with an OllamaSharp.OllamaApiClient and configures it touse function invocation.Calls GetStreamingResponseAsync on the client, passing a prompt and a list of tools thatincludes a function created with Create.Iterates over the response, printing each update to the console.If you're familiar with Caching in .NET, it's good to know that Microsoft.Extensions.AI providesother such delegating IChatClient implementations. The DistributedCachingChatClient is anIChatClient that layers caching around another arbitrary IChatClient instance. When a novelchat history is submitted to the DistributedCachingChatClient, it forwards it to the underlyingclient and then caches the response before sending it back to the consumer. The next time thesame history is submitted, such that a cached response can be found in the cache, theDistributedCachingChatClient returns the cached response rather than forwarding the requestalong the pipeline.C# Console.Write(update);}Cache responsesusing Microsoft.Extensions.AI;using Microsoft.Extensions.Caching.Distributed;using Microsoft.Extensions.Caching.Memory;using Microsoft.Extensions.Options;using OllamaSharp;var sampleChatClient = new OllamaApiClient(new Uri("http://localhost:11434"), "llama3.1");IChatClient client = new ChatClientBuilder(sampleChatClient) .UseDistributedCache(new MemoryDistributedCache( Options.Create(new MemoryDistributedCacheOptions()))) .Build();string[] prompts = ["What is AI?", "What is .NET?", "What is AI?"];foreach (var prompt in prompts){ await foreach (var update in client.GetStreamingResponseAsync(prompt)) { Console.Write(update); }This example depends on the 📦 Microsoft.Extensions.Caching.Memory NuGet package. Formore information, see Caching in .NET.Another example of a delegating chat client is the OpenTelemetryChatClient. Thisimplementation adheres to the OpenTelemetry Semantic Conventions for Generative AIsystems. Similar to other IChatClient delegators, it layers metrics and spans around otherarbitrary IChatClient implementations.C#(The preceding example depends on the 📦 OpenTelemetry.Exporter.Console NuGetpackage.)Alternatively, the LoggingChatClient and corresponding UseLogging(ChatClientBuilder,ILoggerFactory, Action) method provide a simple way to write log entriesto an ILogger for every request and response. Console.WriteLine();}Use telemetryusing Microsoft.Extensions.AI;using OllamaSharp;using OpenTelemetry.Trace;// Configure OpenTelemetry exporter.string sourceName = Guid.NewGuid().ToString();TracerProvider tracerProvider = OpenTelemetry.Sdk.CreateTracerProviderBuilder() .AddSource(sourceName) .AddConsoleExporter() .Build();IChatClient ollamaClient = new OllamaApiClient( new Uri("http://localhost:11434/"), "phi3:mini");IChatClient client = new ChatClientBuilder(ollamaClient) .UseOpenTelemetry( sourceName: sourceName, configure: c => c.EnableSensitiveData = true) .Build();Console.WriteLine((await client.GetResponseAsync("What is AI?")).Text);Provide optionsEvery call to GetResponseAsync or GetStreamingResponseAsync can optionally supply aChatOptions instance containing additional parameters for the operation. The most commonparameters among AI models and services show up as strongly typed properties on the type,such as ChatOptions.Temperature. Other parameters can be supplied by name in a weaklytyped manner, via the ChatOptions.AdditionalProperties dictionary, or via an options instancethat the underlying provider understands, via the ChatOptions.RawRepresentationFactoryproperty.You can also specify options when building an IChatClient with the fluent ChatClientBuilderAPI by chaining a call to the ConfigureOptions(ChatClientBuilder, Action)extension method. This delegating client wraps another client and invokes the supplieddelegate to populate a ChatOptions instance for every call. For example, to ensure that theChatOptions.ModelId property defaults to a particular model name, you can use code like thefollowing:C#IChatClient instances can be layered to create a pipeline of components that each addadditional functionality. These components can come from Microsoft.Extensions.AI, otherNuGet packages, or custom implementations. This approach allows you to augment thebehavior of the IChatClient in various ways to meet your specific needs. Consider thefollowing code snippet that layers a distributed cache, function invocation, and OpenTelemetrytracing around a sample chat client:C#using Microsoft.Extensions.AI;using OllamaSharp;IChatClient client = new OllamaApiClient(new Uri("http://localhost:11434"));client = ChatClientBuilderChatClientExtensions.AsBuilder(client) .ConfigureOptions(options => options.ModelId ??= "phi3") .Build();// Will request "phi3".Console.WriteLine(await client.GetResponseAsync("What is AI?"));// Will request "llama3.1".Console.WriteLine(await client.GetResponseAsync("What is AI?", new() { ModelId = "llama3.1" }));Functionality pipelines// Explore changing the order of the intermediate "Use" calls.IChatClient client = new ChatClientBuilder(new OllamaApiClient(new To add additional functionality, you can implement IChatClient directly or use theDelegatingChatClient class. This class serves as a base for creating chat clients that delegateoperations to another IChatClient instance. It simplifies chaining multiple clients, allowingcalls to pass through to an underlying client.The DelegatingChatClient class provides default implementations for methods likeGetResponseAsync, GetStreamingResponseAsync, and Dispose, which forward calls to the innerclient. A derived class can then override only the methods it needs to augment the behavior,while delegating other calls to the base implementation. This approach is useful for creatingflexible and modular chat clients that are easy to extend and compose.The following is an example class derived from DelegatingChatClient that uses theSystem.Threading.RateLimiting library to provide rate-limiting functionality.C#Uri("http://localhost:11434"), "llama3.1")) .UseDistributedCache(new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()))) .UseFunctionInvocation() .UseOpenTelemetry(sourceName: sourceName, configure: c => c.EnableSensitiveData = true) .Build();Custom IChatClient middlewareusing Microsoft.Extensions.AI;using System.Runtime.CompilerServices;using System.Threading.RateLimiting;public sealed class RateLimitingChatClient( IChatClient innerClient, RateLimiter rateLimiter) : DelegatingChatClient(innerClient){ public override async Task GetResponseAsync( IEnumerable messages, ChatOptions? options = null, CancellationToken cancellationToken = default) { using var lease = await rateLimiter.AcquireAsync(permitCount: 1, cancellationToken) .ConfigureAwait(false); if (!lease.IsAcquired) throw new InvalidOperationException("Unable to acquire lease."); return await base.GetResponseAsync(messages, options, cancellationToken) .ConfigureAwait(false); }As with other IChatClient implementations, the RateLimitingChatClient can be composed:C#To simplify the composition of such components with others, component authors should createa Use* extension method for registering the component into a pipeline. For example, considerthe following UseRatingLimiting extension method:C# public override async IAsyncEnumerable GetStreamingResponseAsync( IEnumerable messages, ChatOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) { using var lease = await rateLimiter.AcquireAsync(permitCount: 1, cancellationToken) .ConfigureAwait(false); if (!lease.IsAcquired) throw new InvalidOperationException("Unable to acquire lease."); await foreach (var update in base.GetStreamingResponseAsync(messages, options, cancellationToken) .ConfigureAwait(false)) { yield return update; } } protected override void Dispose(bool disposing) { if (disposing) rateLimiter.Dispose(); base.Dispose(disposing); }}using Microsoft.Extensions.AI;using OllamaSharp;using System.Threading.RateLimiting;var client = new RateLimitingChatClient( new OllamaApiClient(new Uri("http://localhost:11434"), "llama3.1"), new ConcurrencyLimiter(new() { PermitLimit = 1, QueueLimit = int.MaxValue }));Console.WriteLine(await client.GetResponseAsync("What color is the sky?"));Such extensions can also query for relevant services from the DI container; the IServiceProviderused by the pipeline is passed in as an optional parameter:C#Now it's easy for the consumer to use this in their pipeline, for example:C#using Microsoft.Extensions.AI;using System.Threading.RateLimiting;public static class RateLimitingChatClientExtensions{ public static ChatClientBuilder UseRateLimiting( this ChatClientBuilder builder, RateLimiter rateLimiter) => builder.Use(innerClient => new RateLimitingChatClient(innerClient, rateLimiter) );}using Microsoft.Extensions.AI;using Microsoft.Extensions.DependencyInjection;using System.Threading.RateLimiting;public static class RateLimitingChatClientExtensions{ public static ChatClientBuilder UseRateLimiting( this ChatClientBuilder builder, RateLimiter? rateLimiter = null) => builder.Use((innerClient, services) => new RateLimitingChatClient( innerClient, services.GetRequiredService()) );}HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);IChatClient client = new OllamaApiClient( new Uri("http://localhost:11434/"), "phi3:mini");builder.Services.AddChatClient(services => client .AsBuilder() .UseDistributedCache() .UseRateLimiting()The previous extension methods demonstrate using a Use method on ChatClientBuilder.ChatClientBuilder also provides Use overloads that make it easier to write such delegatinghandlers. For example, in the earlier RateLimitingChatClient example, the overrides ofGetResponseAsync and GetStreamingResponseAsync only need to do work before and afterdelegating to the next client in the pipeline. To achieve the same thing without writing acustom class, you can use an overload of Use that accepts a delegate that's used for bothGetResponseAsync and GetStreamingResponseAsync, reducing the boilerplate required:C#For scenarios where you need a different implementation for GetResponseAsync andGetStreamingResponseAsync in order to handle their unique return types, you can use theUse(Func,ChatOptions,IChatClient,CancellationToken,Task>, Func,ChatOptions,IChatClient,CancellationToken,IAsyncEnumerable>) overload thataccepts a delegate for each. .UseOpenTelemetry() .Build(services));using Microsoft.Extensions.AI;using OllamaSharp;using System.Threading.RateLimiting;RateLimiter rateLimiter = new ConcurrencyLimiter(new(){ PermitLimit = 1, QueueLimit = int.MaxValue});IChatClient client = new OllamaApiClient(new Uri("http://localhost:11434"), "llama3.1");client = ChatClientBuilderChatClientExtensions .AsBuilder(client) .UseDistributedCache() .Use(async (messages, options, nextAsync, cancellationToken) => { using var lease = await rateLimiter.AcquireAsync(permitCount: 1, cancellationToken).ConfigureAwait(false); if (!lease.IsAcquired) throw new InvalidOperationException("Unable to acquire lease."); await nextAsync(messages, options, cancellationToken); }) .UseOpenTelemetry() .Build();IChatClient implementations are often provided to an application via dependency injection (DI).In this example, an IDistributedCache is added into the DI container, as is an IChatClient. Theregistration for the IChatClient uses a builder that creates a pipeline containing a cachingclient (which then uses an IDistributedCache retrieved from DI) and the sample client. Theinjected IChatClient can be retrieved and used elsewhere in the app.C#What instance and configuration is injected can differ based on the current needs of theapplication, and multiple pipelines can be injected with different keys.Stateless services require all relevant conversation history to be sent back on every request. Incontrast, stateful services keep track of the history and require only additional messages to besent with a request. The IChatClient interface is designed to handle both stateless and statefulAI services.When working with a stateless service, callers maintain a list of all messages. They add in allreceived response messages and provide the list back on subsequent interactions.C#Dependency injectionusing Microsoft.Extensions.AI;using Microsoft.Extensions.DependencyInjection;using Microsoft.Extensions.Hosting;using OllamaSharp;// App setup.var builder = Host.CreateApplicationBuilder();builder.Services.AddDistributedMemoryCache();builder.Services.AddChatClient(new OllamaApiClient(new Uri("http://localhost:11434"), "llama3.1")) .UseDistributedCache();var host = builder.Build();// Elsewhere in the app.var chatClient = host.Services.GetRequiredService();Console.WriteLine(await chatClient.GetResponseAsync("What is AI?"));Stateless vs. stateful clientsList history = [];while (true){ Console.Write("Q: "); history.Add(new(ChatRole.User, Console.ReadLine()));For stateful services, you might already know the identifier used for the relevant conversation.You can put that identifier into ChatOptions.ConversationId. Usage then follows the samepattern, except there's no need to maintain a history manually.C#Some services might support automatically creating a conversation ID for a request thatdoesn't have one, or creating a new conversation ID that represents the current state of theconversation after incorporating the last round of messages. In such cases, you can transfer theChatResponse.ConversationId over to the ChatOptions.ConversationId for subsequentrequests. For example:C#If you don't know ahead of time whether the service is stateless or stateful, you can check theresponse ConversationId and act based on its value. If it's set, then that value is propagated tothe options and the history is cleared so as to not resend the same history again. If theresponse ConversationId isn't set, then the response message is added to the history so thatit's sent back to the service on the next turn. var response = await client.GetResponseAsync(history); Console.WriteLine(response); history.AddMessages(response);}ChatOptions statefulOptions = new() { ConversationId = "my-conversation-id" };while (true){ Console.Write("Q: "); ChatMessage message = new(ChatRole.User, Console.ReadLine()); Console.WriteLine(await client.GetResponseAsync(message, statefulOptions));}ChatOptions options = new();while (true){ Console.Write("Q: "); ChatMessage message = new(ChatRole.User, Console.ReadLine()); ChatResponse response = await client.GetResponseAsync(message, options); Console.WriteLine(response); options.ConversationId = response.ConversationId;}C#The IEmbeddingGenerator interface represents a generic generator ofembeddings. For the generic type parameters, TInput is the type of input values beingembedded, and TEmbedding is the type of generated embedding, which inherits from theEmbedding class.The Embedding class serves as a base class for embeddings generated by anIEmbeddingGenerator. It's designed to store and manage the metadata and data associatedwith embeddings. Derived types, like Embedding, provide the concrete embedding vectordata. For example, an Embedding exposes a ReadOnlyMemory Vector { get; }property for access to its embedding data.The IEmbeddingGenerator interface defines a method to asynchronously generate embeddingsfor a collection of input values, with optional configuration and cancellation support. It alsoprovides metadata describing the generator and allows for the retrieval of strongly typedservices that can be provided by the generator or its underlying services.Most users don't need to implement the IEmbeddingGenerator interface. However, if you're alibrary author, you can see a simple implementation at Sample implementations of IChatClientand IEmbeddingGenerator.List chatHistory = [];ChatOptions chatOptions = new();while (true){ Console.Write("Q: "); chatHistory.Add(new(ChatRole.User, Console.ReadLine())); ChatResponse response = await client.GetResponseAsync(chatHistory); Console.WriteLine(response); chatOptions.ConversationId = response.ConversationId; if (response.ConversationId is not null) { chatHistory.Clear(); } else { chatHistory.AddMessages(response); }}The IEmbeddingGenerator interfaceThe primary operation performed with an IEmbeddingGenerator isembedding generation, which is accomplished with its GenerateAsync method.C#Accelerator extension methods also exist to simplify common cases, such as generating anembedding vector from a single input.C#As with IChatClient, IEmbeddingGenerator implementations can be layered.Microsoft.Extensions.AI provides a delegating implementation for IEmbeddingGenerator forcaching and telemetry.C#Create embeddingsusing Microsoft.Extensions.AI;using OllamaSharp;IEmbeddingGenerator> generator = new OllamaApiClient(new Uri("http://localhost:11434/"), "phi3:mini");foreach (Embedding embedding in await generator.GenerateAsync(["What is AI?", "What is .NET?"])){ Console.WriteLine(string.Join(", ", embedding.Vector.ToArray()));}ReadOnlyMemory vector = await generator.GenerateVectorAsync("What is AI?");Pipelines of functionalityusing Microsoft.Extensions.AI;using Microsoft.Extensions.Caching.Distributed;using Microsoft.Extensions.Caching.Memory;using Microsoft.Extensions.Options;using OllamaSharp;using OpenTelemetry.Trace;// Configure OpenTelemetry exporterstring sourceName = Guid.NewGuid().ToString();TracerProvider tracerProvider = OpenTelemetry.Sdk.CreateTracerProviderBuilder() .AddSource(sourceName) .AddConsoleExporter() .Build();The IEmbeddingGenerator enables building custom middleware that extends the functionality ofan IEmbeddingGenerator. The DelegatingEmbeddingGenerator class is animplementation of the IEmbeddingGenerator interface that serves as abase class for creating embedding generators that delegate their operations to anotherIEmbeddingGenerator instance. It allows for chaining multiple generatorsin any order, passing calls through to an underlying generator. The class provides defaultimplementations for methods such as GenerateAsync and Dispose, which forward the calls tothe inner generator instance, enabling flexible and modular embedding generation.The following is an example implementation of such a delegating embedding generator thatrate-limits embedding generation requests:C#// Explore changing the order of the intermediate "Use" calls to see// what impact that has on what gets cached and traced.IEmbeddingGenerator> generator = new EmbeddingGeneratorBuilder>( new OllamaApiClient(new Uri("http://localhost:11434/"), "phi3:mini")) .UseDistributedCache( new MemoryDistributedCache( Options.Create(new MemoryDistributedCacheOptions()))) .UseOpenTelemetry(sourceName: sourceName) .Build();GeneratedEmbeddings> embeddings = await generator.GenerateAsync([ "What is AI?", "What is .NET?", "What is AI?"]);foreach (Embedding embedding in embeddings){ Console.WriteLine(string.Join(", ", embedding.Vector.ToArray()));}using Microsoft.Extensions.AI;using System.Threading.RateLimiting;public class RateLimitingEmbeddingGenerator( IEmbeddingGenerator> innerGenerator, RateLimiter rateLimiter) : DelegatingEmbeddingGenerator>(innerGenerator){ public override async Task>> GenerateAsync( IEnumerable values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)This can then be layered around an arbitrary IEmbeddingGenerator>to rate limit all embedding generation operations.C#In this way, the RateLimitingEmbeddingGenerator can be composed with otherIEmbeddingGenerator> instances to provide rate-limitingfunctionality. { using var lease = await rateLimiter.AcquireAsync(permitCount: 1, cancellationToken) .ConfigureAwait(false); if (!lease.IsAcquired) { throw new InvalidOperationException("Unable to acquire lease."); } return await base.GenerateAsync(values, options, cancellationToken); } protected override void Dispose(bool disposing) { if (disposing) { rateLimiter.Dispose(); } base.Dispose(disposing); }}using Microsoft.Extensions.AI;using OllamaSharp;using System.Threading.RateLimiting;IEmbeddingGenerator> generator = new RateLimitingEmbeddingGenerator( new OllamaApiClient(new Uri("http://localhost:11434/"), "phi3:mini"), new ConcurrencyLimiter(new() { PermitLimit = 1, QueueLimit = int.MaxValue }));foreach (Embedding embedding in await generator.GenerateAsync(["What is AI?", "What is .NET?"])){ Console.WriteLine(string.Join(", ", embedding.Vector.ToArray()));}You can start building with Microsoft.Extensions.AI in the following ways:Library developers: If you own libraries that provide clients for AI services, considerimplementing the interfaces in your libraries. This allows users to easily integrate yourNuGet package via the abstractions. For example implementations, see Sampleimplementations of IChatClient and IEmbeddingGenerator.Service consumers: If you're developing libraries that consume AI services, use theabstractions instead of hardcoding to a specific AI service. This approach gives yourconsumers the flexibility to choose their preferred provider.Application developers: Use the abstractions to simplify integration into your apps. Thisenables portability across models and services, facilitates testing and mocking, leveragesmiddleware provided by the ecosystem, and maintains a consistent API throughout yourapp, even if you use different services in different parts of your application.Ecosystem contributors: If you're interested in contributing to the ecosystem, considerwriting custom middleware components.For more samples, see the dotnet/ai-samples GitHub repository. For an end-to-end sample,see eShopSupport.Request a response with structured outputBuild an AI chat app with .NETDependency injection in .NETCaching in .NETRate limit an HTTP handler in .NETBuild with Microsoft.Extensions.AISee alsoSemantic Kernel overview for .NETArticle•04/09/2025In this article, you explore Semantic Kernel core concepts and capabilities. Semantic Kernel is apowerful and recommended choice for working with AI in .NET applications. In the sectionsahead, you learn:How to add semantic kernel to your projectSemantic Kernel core conceptsThis article serves as an introductory overview of Semantic Kernel specifically in the context of.NET. For more comprehensive information and training about Semantic Kernel, see thefollowing resources:Semantic Kernel documentationSemantic Kernel trainingThe Semantic Kernel SDK is available as a NuGet package for .NET and integrates with standardapp configurations.Install the Microsoft.SemanticKernel package using the following command:.NET CLIOr, in .NET 10+:.NET CLIAdd Semantic Kernel to a .NET projectdotnet add package Microsoft.SemanticKerneldotnet package add Microsoft.SemanticKernel7 NoteAlthough Microsoft.SemanticKernel provides core features of Semantic Kernel, additionalcapabilities require you to install additional packages. For example, theMicrosoft.SemanticKernel.Plugins.Memory package provides to access memory relatedfeatures. For more information, see the Semantic Kernel documentation.Create and configure a Kernel instance using the KernelBuilder class to access and work withSemantic Kernel. The Kernel holds services, data, and connections to orchestrate integrationsbetween your code and AI models.Configure the Kernel in a .NET console app:C#Configure the Kernel in an ASP.NET Core app:C#Semantic Kernel is an open-source SDK that integrates and orchestrates AI models and serviceslike OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages likeC#, Python, and Java.The Semantic Kernel SDK benefits enterprise developers in the following ways:Streamlines integration of AI capabilities into existing applications to enable a cohesivesolution for enterprise products.Minimizes the learning curve of working with different AI models or services by providingabstractions that reduce complexity.Improves reliability by reducing the unpredictable behavior of prompts and responsesfrom AI models. You can fine-tune prompts and plan tasks to create a controlled andpredictable user experience.Semantic Kernel is built around several core concepts:Connections: Interface with external AI services and data sources.Plugins: Encapsulate functions that applications can use.var builder = Kernel.CreateBuilder();// Add builder configuration and servicesvar kernel = builder.Build();var builder = WebApplication.CreateBuilder();builder.Services.AddKernel();// Add builder configuration and servicesvar app = builder.Build();Understand Semantic KernelPlanner: Orchestrates execution plans and strategies based on user behavior.Memory: Abstracts and simplifies context management for AI apps.These building blocks are explored in more detail in the following sections.The Semantic Kernel SDK includes a set of connectors that enable developers to integrate LLMsand other services into their existing applications. These connectors serve as the bridgebetween the application code and the AI models or services. Semantic Kernel handles manycommon connection concerns and challenges for you so you can focus on building your ownworkflows and features.The following code snippet creates a Kernel and adds a connection to an Azure OpenAImodel:C#Semantic Kernel plugins encapsulate standard language functions for applications and AImodels to consume. You can create your own plugins or rely on plugins provided by the SDK.These plugins streamline tasks where AI models are advantageous and efficiently combinethem with more traditional C# methods. Plugin functions are generally categorized into twotypes: semantic functions and native functions.Semantic functions are essentially AI prompts defined in your code that Semantic Kernel cancustomize and call as needed. You can templatize these prompts to use variables, customprompt and completion formatting, and more.Connectionsusing Microsoft.SemanticKernel;// Create kernelvar builder = Kernel.CreateBuilder();// Add a chat completion service:builder.Services.AddAzureOpenAIChatCompletion( "your-resource-name", "your-endpoint", "your-resource-key", "deployment-model");var kernel = builder.Build();PluginsSemantic functionsThe following code snippet defines and registers a semantic function:C#Native functions are C# methods that Semantic Kernel can call directly to manipulate orretrieve data. They perform operations that are better suited for traditional code instructionsinstead of LLM prompts.The following code snippet defines and registers a native function:C#var userInput = Console.ReadLine();// Define semantic function inline.string skPrompt = @"Summarize the provided unstructured text in a sentence that is easy to understand. Text to summarize: {{$userInput}}";// Register the functionkernel.CreateSemanticFunction( promptTemplate: skPrompt, functionName: "SummarizeText", pluginName: "SemanticFunctions");Native functions// Define native functionpublic class NativeFunctions { [SKFunction, Description("Retrieve content from local file")] public async Task RetrieveLocalFile(string fileName, int maxSize = 5000) { string content = await File.ReadAllTextAsync(fileName); if (content.Length <= maxSize) return content; return content.Substring(0, maxSize); }}//Import native functionstring plugInName = "NativeFunction";string functionName = "RetrieveLocalFile";var nativeFunctions = new NativeFunctions();kernel.ImportFunctions(nativeFunctions, plugInName);The planner is a core component of Semantic Kernel that provides AI orchestration to manageseamless integration between AI models and plugins. This layer devises execution strategiesfrom user requests and dynamically orchestrates Plugins to perform complex tasks with AI-assisted planning.Consider the following pseudo-code snippet:C#The preceding code creates an executable, sequential plan to read content from a local file andsummarize the content. The plan sets up instructions to read the file using a native functionand then analyze it using an AI model.Semantic Kernel's Vector stores provide abstractions over embedding models, vectordatabases, and other data to simplify context management for AI applications. Vector storesare agnostic to the underlying LLM or Vector database, offering a uniform developerexperience. You can configure memory features to store data in a variety of sources or service,including Azure AI Search and Azure Cache for Redis.Consider the following code snippet:C#Planner// Native function definition and kernel configuration code omitted for brevity// Configure and create the planstring planDefinition = "Read content from a local file and summarize the content.";SequentialPlanner sequentialPlanner = new SequentialPlanner(kernel);string assetsFolder = @"../../assets";string fileName = Path.Combine(assetsFolder,"docs","06_SemanticKernel", "aci_documentation.txt");ContextVariables contextVariables = new ContextVariables();contextVariables.Add("fileName", fileName);var customPlan = await sequentialPlanner.CreatePlanAsync(planDefinition);// Execute the planKernelResult kernelResult = await kernel.RunAsync(contextVariables, customPlan);Console.WriteLine($"Summarization: {kernelResult.GetValue()}");MemoryThe preceding code loads a set of facts into memory so that the data is available to use wheninteracting with AI models and orchestrating tasks. var facts = new Dictionary();facts.Add( "Azure Machine Learning; https://learn.microsoft.com/en-us/azure/machine-learning/", @"Azure Machine Learning is a cloud service for accelerating and managing the machine learning project lifecycle. Machine learning professionals, data scientists, and engineers can use it in their day-to-day workflows");facts.Add( "Azure SQL Service; https://learn.microsoft.com/en-us/azure/azure-sql/", @"Azure SQL is a family of managed, secure, and intelligent products that use the SQL Server database engine in the Azure cloud.");string memoryCollectionName = "SummarizedAzureDocs";foreach (var fact in facts) { await memoryBuilder.SaveReferenceAsync( collection: memoryCollectionName, description: fact.Key.Split(";")[0].Trim(), text: fact.Value, externalId: fact.Key.Split(";")[1].Trim(), externalSourceName: "Azure Documentation" );}Quickstart - Summarize text with OpenAIQuickstart - Chat with your dataGet started with .NET AI and the ModelContext ProtocolArticle•05/05/2025The Model Context Protocol (MCP) is an open protocol designed to standardize integrationsbetween AI apps and external tools and data sources. By using MCP, developers can enhancethe capabilities of AI models, enabling them to produce more accurate, relevant, and context-aware responses.For example, using MCP, you can connect your LLM to resources such as:Document databases or storage services.Web APIs that expose business data or logic.Tools that manage files or performing local tasks on a user's device.Many Microsoft products already support MCP, including:Copilot StudioVisual Studio Code GitHub Copilot agent modeSemantic Kernel.You can use the MCP C# SDK to quickly create your own MCP integrations and switch betweendifferent AI models without significant code changes.MCP uses a client-server architecture that enables an AI-powered app (the host) to connect tomultiple MCP servers through MCP clients:MCP Hosts: AI tools, code editors, or other software that enhance their AI models usingcontextual resources through MCP. For example, GitHub Copilot in Visual Studio Codecan act as an MCP host and use MCP clients and servers to expand its capabilities.MCP Clients: Clients used by the host application to connect to MCP servers to retrievecontextual data.MCP Servers: Services that expose capabilities to clients through MCP. For example, anMCP server might provide an abstraction over a REST API or local data source to providebusiness data to the AI model.The following diagram illustrates this architecture:MCP client-server architectureMCP client and server can exchange a set of standard messages:MessageDescriptionInitializeRequestThis request is sent by the client to the server when it first connects, asking it tobegin initialization.ListToolsRequestSent by the client to request a list of tools the server has.CallToolRequestUsed by the client to invoke a tool provided by the server.ListResourcesRequestSent by the client to request a list of available server resources.ReadResourceRequestSent by the client to the server to read a specific resource URI.ListPromptsRequestSent by the client to request a list of available prompts and prompt templatesfrom the server.GetPromptRequestUsed by the client to get a prompt provided by the server.PingRequestA ping, issued by either the server or the client, to check that the other party isstill alive.CreateMessageRequestA request by the server to sample an LLM via the client. The client has fulldiscretion over which model to select. The client should also inform the userbefore beginning sampling, to allow them to inspect the request (human in theloop) and decide whether to approve it.SetLevelRequestA request by the client to the server, to enable or adjust logging.ノExpand tableDevelop with the MCP C# SDKAs a .NET developer, you can use MCP by creating MCP clients and servers to enhance yourapps with custom integrations. MCP reduces the complexity involved in connecting an AImodel to various tools, services, and data sources.The official MCP C# SDK is available through NuGet and enables you to build MCP clientsand servers for .NET apps and libraries. The SDK is maintained through collaboration betweenMicrosoft, Anthropic, and the MCP open protocol organization.To get started, add the MCP C# SDK to your project:.NET CLIInstead of building unique connectors for each integration point, you can often leverage orreference prebuilt integrations from various providers such as GitHub and Docker:Available MPC clientsAvailable MCP serversThe MCP C# SDK depends on the Microsoft.Extensions.AI libraries to handle various AIinteractions and tasks. These extension libraries provides core types and abstractions forworking with AI services, so developers can focus on coding against conceptual AI capabilitiesrather than specific platforms or provider implementations.View the MCP C# SDK dependencies on the NuGet package page.Various tools, services, and learning resources are available in the .NET and Azure ecosystemsto help you build MCP clients and servers or integrate with existing MCP servers.Get started with the following development tools:Semantic Kernel allows you to add plugins for MCP servers. Semantic Kernel supportsboth local MCP servers through standard I/O and remote servers that connect throughSSE over HTTPS.Azure Functions remote MCP servers combine MCP standards with the flexiblearchitecture of Azure Functions. Visit the Remote MCP functions sample repository forcode examples.dotnet add package ModelContextProtocol --prereleaseIntegration with Microsoft.Extensions.AIMore .NET MCP development resourcesAzure MCP Server implements the MCP specification to seamlessly connect AI agentswith key Azure services like Azure Storage, Cosmos DB, and more.Learn more about .NET and MCP using these resources:Microsoft partners with Anthropic to create official C# SDK for Model Context ProtocolBuild a Model Context Protocol (MCP) server in C#MCP C# SDK READMEOverview of the .NET + AI ecosystemMicrosoft.Extensions.AISemantic Kernel overview for .NETRelated contentBuild an AI chat app with .NETArticle•05/17/2025In this quickstart, you learn how to create a conversational .NET console chat app using anOpenAI or Azure OpenAI model. The app uses the Microsoft.Extensions.AI library so you canwrite code using AI abstractions rather than a specific SDK. AI abstractions enable you tochange the underlying AI model with minimal code changes..NET 8.0 SDK or higher - Install the .NET 8.0 SDK.An API key from OpenAI so you can run this sample.Complete the following steps to create a .NET console app to connect to an AI model.1. In an empty directory on your computer, use the dotnet new command to create a newconsole app:.NET CLI2. Change directory into the app folder:.NET CLI3. Install the required packages:BashPrerequisites7 NoteYou can also use Semantic Kernel to accomplish the tasks in this article. Semantic Kernel isa lightweight, open-source SDK that lets you build AI agents and integrate the latest AImodels into your .NET apps.Create the appdotnet new console -o ChatAppAIcd ChatAppAI4. Open the app in Visual Studio Code (or your editor of choice).Bash1. Navigate to the root of your .NET project from a terminal or command prompt.2. Run the following commands to configure your OpenAI API key as a secret for the sampleapp:BashThis app uses the Microsoft.Extensions.AI package to send and receive requests to the AImodel. The app provides users with information about hiking trails.1. In the Program.cs file, add the following code to connect and authenticate to the AImodel.C#dotnet add package OpenAIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretscode .Configure the appdotnet user-secrets initdotnet user-secrets set OpenAIKey dotnet user-secrets set ModelName Add the app codevar config = new ConfigurationBuilder().AddUserSecrets().Build();string model = config["ModelName"];string key = config["OpenAIKey"];// Create the IChatClientIChatClient chatClient = new OpenAIClient(key).GetChatClient(model).AsIChatClient();2. Create a system prompt to provide the AI model with initial role context and instructionsabout hiking recommendations:C#3. Create a conversational loop that accepts an input prompt from the user, sends theprompt to the model, and prints the response completion:C#// Start the conversation with context for the AI modelList chatHistory = [ new ChatMessage(ChatRole.System, """ You are a friendly hiking enthusiast who helps people discover fun hikes in their area. You introduce yourself when first saying hello. When helping people out, you always ask them for this information to inform the hiking recommendation you provide: 1. The location where they would like to hike 2. What hiking intensity they are looking for You will then provide three suggestions for nearby hikes that vary in length after you get that information. You will also share an interesting fact about the local nature on the hikes when making a recommendation. At the end of your response, ask if there is anything else you can help with. """) ];// Loop to get user input and stream AI responsewhile (true){ // Get user prompt and add to chat history Console.WriteLine("Your prompt:"); string? userPrompt = Console.ReadLine(); chatHistory.Add(new ChatMessage(ChatRole.User, userPrompt)); // Stream the AI response and add to chat history Console.WriteLine("AI Response:"); string response = ""; await foreach (ChatResponseUpdate item in chatClient.GetStreamingResponseAsync(chatHistory)) { Console.Write(item.Text); response += item.Text; } chatHistory.Add(new ChatMessage(ChatRole.Assistant, response));4. Use the dotnet run command to run the app:.NET CLIThe app prints out the completion response from the AI model. Send additional follow upprompts and ask other questions to experiment with the AI chat functionality.Quickstart - Chat with a local AI modelGenerate images using AI with .NET Console.WriteLine();}dotnet runNext stepsRequest a response with structured outputArticle•05/17/2025In this quickstart, you create a chat app that requests a response with structured output. Astructured output response is a chat response that's of a type you specify instead of just plaintext. The chat app you create in this quickstart analyzes sentiment of various product reviews,categorizing each review according to the values of a custom enumeration..NET 8 or a later versionVisual Studio Code (optional)To provision an Azure OpenAI service and model using the Azure portal, complete the steps inthe Create and deploy an Azure OpenAI Service resource article. In the "Deploy a model" step,select the gpt-4o model.Complete the following steps to create a console app that connects to the gpt-4o AI model.1. In a terminal window, navigate to the directory where you want to create your app, andcreate a new console app with the dotnet new command:.NET CLI2. Navigate to the SOChat directory, and add the necessary packages to your app:.NET CLIPrerequisitesConfigure the AI serviceCreate the chat appdotnet new console -o SOChatdotnet add package Azure.AI.OpenAIdotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecrets3. Run the following commands to add app secrets for your Azure OpenAI endpoint, modelname, and tenant ID:Bash4. Open the new app in your editor of choice.1. Define the enumeration that describes the different sentiments.C#2. Create the IChatClient that will communicate with the model.C#dotnet user-secrets initdotnet user-secrets set AZURE_OPENAI_ENDPOINT dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4odotnet user-secrets set AZURE_TENANT_ID 7 NoteDepending on your environment, the tenant ID might not be needed. In that case,remove it from the code that instantiates the DefaultAzureCredential.Add the codepublic enum Sentiment{ Positive, Negative, Neutral}IConfigurationRoot config = new ConfigurationBuilder() .AddUserSecrets() .Build();string endpoint = config["AZURE_OPENAI_ENDPOINT"];string model = config["AZURE_OPENAI_GPT_NAME"];string tenantId = config["AZURE_TENANT_ID"];// Get a chat client for the Azure OpenAI endpoint.AzureOpenAIClient azureClient = new( new Uri(endpoint),3. Send a request to the model with a single product review, and then print the analyzedsentiment to the console. You declare the requested structured output type by passing itas the type argument to theChatClientStructuredOutputExtensions.GetResponseAsync(IChatClient, String,ChatOptions, Nullable, CancellationToken) extension method.C#This code produces output similar to:Output4. Instead of just analyzing a single review, you can analyze a collection of reviews.C# new DefaultAzureCredential(new DefaultAzureCredentialOptions() { TenantId = tenantId }));IChatClient chatClient = azureClient .GetChatClient(deploymentName: model) .AsIChatClient();7 NoteDefaultAzureCredential searches for authentication credentials from yourenvironment or local tooling. You'll need to assign the Azure AI Developer role tothe account you used to sign in to Visual Studio or the Azure CLI. For moreinformation, see Authenticate to Azure AI services with .NET.string review = "I'm happy with the product!";var response = await chatClient.GetResponseAsync($"What's the sentiment of this review? {review}");Console.WriteLine($"Sentiment: {response.Result}");Sentiment: Positivestring[] inputs = [ "Best purchase ever!", "Returned it immediately.", "Hello", "It works as advertised.", "The packaging was damaged but otherwise okay."];foreach (var i in inputs)This code produces output similar to:Output5. And instead of requesting just the analyzed enumeration value, you can request the textresponse along with the analyzed value.Define a record type to contain the text response and analyzed sentiment:C#Send the request using the record type as the type argument to GetResponseAsync:C#This code produces output similar to:Output{ var response2 = await chatClient.GetResponseAsync($"What's the sentiment of this review? {i}"); Console.WriteLine($"Review: {i} | Sentiment: {response2.Result}");}Review: Best purchase ever! | Sentiment: PositiveReview: Returned it immediately. | Sentiment: NegativeReview: Hello | Sentiment: NeutralReview: It works as advertised. | Sentiment: NeutralReview: The packaging was damaged but otherwise okay. | Sentiment: Neutralrecord SentimentRecord(string ResponseText, Sentiment ReviewSentiment);var review3 = "This product worked okay.";var response3 = await chatClient.GetResponseAsync($"What's the sentiment of this review? {review3}");Console.WriteLine($"Response text: {response3.Result.ResponseText}");Console.WriteLine($"Sentiment: {response3.Result.ReviewSentiment}");Response text: Certainly, I have analyzed the sentiment of the review you provided.Sentiment: NeutralClean up resourcesIf you no longer need them, delete the Azure OpenAI resource and GPT-4 model deployment.1. In the Azure Portal, navigate to the Azure OpenAI resource.2. Select the Azure OpenAI resource, and then select Delete.Structured outputs (Azure OpenAI Service)Using JSON schema for structured output in .NET for OpenAI modelsIntroducing Structured Outputs in the API (OpenAI)See alsoBuild a .NET AI vector search app06/06/2025In this quickstart, you create a .NET console app to perform semantic search on a vector storeto find relevant results for the user's query. You learn how to generate embeddings for userprompts and use those embeddings to query the vector data store.Vector stores, or vector databases, are essential for tasks like semantic search, retrievalaugmented generation (RAG), and other scenarios that require grounding generative AIresponses. While relational databases and document databases are optimized for structuredand semi-structured data, vector databases are built to efficiently store, index, and managedata represented as embedding vectors. As a result, the indexing and search algorithms usedby vector databases are optimized to efficiently retrieve data that can be used downstream inyour applications.The app uses the Microsoft.Extensions.AI and Microsoft.Extensions.VectorData libraries so youcan write code using AI abstractions rather than a specific SDK. AI abstractions help createloosely coupled code that allows you to change the underlying AI model with minimal appchanges.📦 Microsoft.Extensions.VectorData.Abstractions is a .NET library developed in collaborationwith Semantic Kernel and the broader .NET ecosystem to provide a unified layer of abstractionsfor interacting with vector stores. The abstractions inMicrosoft.Extensions.VectorData.Abstractions provide library authors and developers withthe following functionality:Perform create-read-update-delete (CRUD) operations on vector stores.Use vector and text search on vector stores..NET 8.0 SDK or higher - Install the .NET 8.0 SDK.An API key from OpenAI so you can run this sample.About the libraries7 NoteThe Microsoft.Extensions.VectorData.Abstractions library is currently in preview.PrerequisitesComplete the following steps to create a .NET console app that can:Create and populate a vector store by generating embeddings for a data set.Generate an embedding for the user prompt.Query the vector store using the user prompt embedding.Display the relevant results from the vector search.1. In an empty directory on your computer, use the dotnet new command to create a newconsole app:.NET CLI2. Change directory into the app folder:.NET CLI3. Install the required packages:BashThe following list describes each package in the VectorDataAI app:Microsoft.Extensions.AI.OpenAI provides AI abstractions for OpenAI-compatiblemodels or endpoints. This library also includes the official OpenAI library for theOpenAI service API as a dependency.Microsoft.Extensions.VectorData.Abstractions enables Create-Read-Update-Delete(CRUD) and search operations on vector stores.Microsoft.SemanticKernel.Connectors.InMemory provides an in-memory vectorstore class to hold queryable vector data records.Microsoft.Extensions.Configuration provides an implementation of key-value pair—based configuration.Create the appdotnet new console -o VectorDataAIcd VectorDataAIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.VectorData.Abstractions --prereleasedotnet add package Microsoft.SemanticKernel.Connectors.InMemory --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretsdotnet add package System.Linq.AsyncEnumerableMicrosoft.Extensions.Configuration.UserSecrets is a user secrets configurationprovider implementation for Microsoft.Extensions.Configuration.4. Open the app in Visual Studio Code (or your editor of choice).Bash1. Navigate to the root of your .NET project from a terminal or command prompt.2. Run the following commands to configure your OpenAI API key as a secret for the sampleapp:Bash1. Add a new class named CloudService to your project with the following properties:C#code .Configure the appdotnet user-secrets initdotnet user-secrets set OpenAIKey dotnet user-secrets set ModelName 7 NoteFor the model name, you need to specify a text embedding model such as text-embedding-3-small or text-embedding-3-large to generate embeddings for vector searchin the sections that follow. For more information about embedding models, seeEmbeddings.Add the app codeusing Microsoft.Extensions.VectorData;namespace VectorDataAI;internal class CloudService{ [VectorStoreKey] public int Key { get; set; }The Microsoft.Extensions.VectorData attributes, such as VectorStoreKeyAttribute, influencehow each property is handled when used in a vector store. The Vector property stores agenerated embedding that represents the semantic meaning of the Description value forvector searches.2. In the Program.cs file, add the following code to create a data set that describes acollection of cloud services:C# [VectorStoreData] public string Name { get; set; } [VectorStoreData] public string Description { get; set; } [VectorStoreVector( Dimensions: 384, DistanceFunction = DistanceFunction.CosineSimilarity)] public ReadOnlyMemory Vector { get; set; }}List cloudServices =[ new() { Key = 0, Name = "Azure App Service", Description = "Host .NET, Java, Node.js, and Python web applications and APIs in a fully managed Azure service. You only need to deploy your code to Azure. Azure takes care of all the infrastructure management like high availability, load balancing, and autoscaling." }, new() { Key = 1, Name = "Azure Service Bus", Description = "A fully managed enterprise message broker supporting both point to point and publish-subscribe integrations. It's ideal for building decoupled applications, queue-based load leveling, or facilitating communication between microservices." }, new() { Key = 2, Name = "Azure Blob Storage", Description = "Azure Blob Storage allows your applications to store and retrieve files in the cloud. Azure Storage is highly scalable to store massive amounts of data and data is stored redundantly to ensure high availability." }, new() { Key = 3,3. Create and configure an IEmbeddingGenerator implementation to send requests to anembedding AI model:C#4. Create and populate a vector store with the cloud service data. Use theIEmbeddingGenerator implementation to create and assign an embedding vector for eachrecord in the cloud service data:C# Name = "Microsoft Entra ID", Description = "Manage user identities and control access to your apps, data, and resources." }, new() { Key = 4, Name = "Azure Key Vault", Description = "Store and access application secrets like connection strings and API keys in an encrypted vault with restricted access to make sure your secrets and your application aren't compromised." }, new() { Key = 5, Name = "Azure AI Search", Description = "Information retrieval at scale for traditional and conversational search applications, with security and options for AI enrichment and vectorization." }];// Load the configuration values.IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets().Build();string model = config["ModelName"];string key = config["OpenAIKey"];// Create the embedding generator.IEmbeddingGenerator> generator = new OpenAIClient(new ApiKeyCredential(key)) .GetEmbeddingClient(model: model) .AsIEmbeddingGenerator();// Create and populate the vector store.var vectorStore = new InMemoryVectorStore();VectorStoreCollection cloudServicesStore = vectorStore.GetCollection("cloudServices");await cloudServicesStore.EnsureCollectionExistsAsync();foreach (CloudService service in cloudServices)The embeddings are numerical representations of the semantic meaning for each datarecord, which makes them compatible with vector search features.5. Create an embedding for a search query and use it to perform a vector search on thevector store:C#6. Use the dotnet run command to run the app:.NET CLIThe app prints out the top result of the vector search, which is the cloud service that'smost relevant to the original query. You can modify the query to try different searchscenarios.Quickstart - Chat with a local AI modelGenerate images using AI with .NET{ service.Vector = await generator.GenerateVectorAsync(service.Description); await cloudServicesStore.UpsertAsync(service);}// Convert a search query to a vector// and search the vector store.string query = "Which Azure service should I use to store my Word documents?";ReadOnlyMemory queryEmbedding = await generator.GenerateVectorAsync(query);IAsyncEnumerable> results = cloudServicesStore.SearchAsync(queryEmbedding, top: 1);await foreach (VectorSearchResult result in results){ Console.WriteLine($"Name: {result.Record.Name}"); Console.WriteLine($"Description: {result.Record.Description}"); Console.WriteLine($"Vector match score: {result.Score}");}dotnet runNext stepsInvoke .NET functions using an AI modelArticle•05/18/2025In this quickstart, you create a .NET console AI chat app to connect to an AI model with localfunction calling enabled. The app uses the Microsoft.Extensions.AI library so you can write codeusing AI abstractions rather than a specific SDK. AI abstractions enable you to change theunderlying AI model with minimal code changes..NET 8.0 SDK or higher - Install the .NET 8.0 SDK.An API key from OpenAI so you can run this sample.Complete the following steps to create a .NET console app to connect to an AI model.1. In an empty directory on your computer, use the dotnet new command to create a newconsole app:.NET CLI2. Change directory into the app folder:.NET CLI3. Install the required packages:BashPrerequisites7 NoteYou can also use Semantic Kernel to accomplish the tasks in this article. Semantic Kernel isa lightweight, open-source SDK that lets you build AI agents and integrate the latest AImodels into your .NET apps.Create the appdotnet new console -o FunctionCallingAIcd FunctionCallingAI4. Open the app in Visual Studio Code or your editor of choiceBash1. Navigate to the root of your .NET project from a terminal or command prompt.2. Run the following commands to configure your OpenAI API key as a secret for the sampleapp:BashThe app uses the Microsoft.Extensions.AI package to send and receive requests to the AImodel.1. In the Program.cs file, add the following code to connect and authenticate to the AImodel. The ChatClient is also configured to use function invocation, which allows the AImodel to call .NET functions in your code.C#dotnet add package Microsoft.Extensions.AIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretscode .Configure the appdotnet user-secrets initdotnet user-secrets set OpenAIKey dotnet user-secrets set ModelName Add the app codeusing Microsoft.Extensions.AI;using Microsoft.Extensions.Configuration;using OpenAI;IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets().Build();string? model = config["ModelName"];string? key = config["OpenAIKey"];2. Create a new ChatOptions object that contains an inline function the AI model can call toget the current weather. The function declaration includes a delegate to run logic, andname and description parameters to describe the purpose of the function to the AImodel.C#3. Add a system prompt to the chatHistory to provide context and instructions to themodel. Send a user prompt with a question that requires the AI model to call theregistered function to properly answer the question.C#IChatClient client = new ChatClientBuilder(new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient()) .UseFunctionInvocation() .Build();// Add a new plugin with a local .NET function// that should be available to the AI model.var chatOptions = new ChatOptions{ Tools = [AIFunctionFactory.Create((string location, string unit) => { // Here you would call a weather API // to get the weather for the location. return "Periods of rain or drizzle, 15 C"; }, "get_current_weather", "Get the current weather in a given location")]};// System prompt to provide context.List chatHistory = [new(ChatRole.System, """ You are a hiking enthusiast who helps people discover fun hikes in their area. You are upbeat and friendly. """)];// Weather conversation relevant to the registered function.chatHistory.Add(new ChatMessage(ChatRole.User, "I live in Montreal and I'm looking for a moderate intensity hike. What's the current weather like?"));Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}");ChatResponse response = await client.GetResponseAsync(chatHistory, chatOptions);Console.WriteLine($"Assistant >>> {response.Text}");4. Use the dotnet run command to run the app:.NET CLIThe app prints the completion response from the AI model, which includes data providedby the .NET function. The AI model understood that the registered function was availableand called it automatically to generate a proper response.Quickstart - Build an AI chat app with .NETGenerate text and conversations with .NET and Azure OpenAI Completionsdotnet runNext stepsGenerate images using AI with .NETArticle•05/18/2025In this quickstart, you learn how to create a .NET console app to generate images using anOpenAI or Azure OpenAI DALLe AI model, which are specifically designed to generate imagesbased on text prompts..NET 8.0 SDK or higher - Install the .NET 8.0 SDK.An API key from OpenAI so you can run this sample.Complete the following steps to create a .NET console app to connect to an AI model.1. In an empty directory on your computer, use the dotnet new command to create a newconsole app:.NET CLI2. Change directory into the app folder:.NET CLI3. Install the required packages:BashPrerequisites7 NoteYou can also use Semantic Kernel to accomplish the tasks in this article. Semantic Kernel isa lightweight, open-source SDK that lets you build AI agents and integrate the latest AImodels into your .NET apps.Create the appdotnet new console -o ImagesAIcd ImagesAIdotnet add package OpenAIdotnet add package Microsoft.Extensions.Configuration4. Open the app in Visual Studio Code or your editor of choice.Bash1. Navigate to the root of your .NET project from a terminal or command prompt.2. Run the following commands to configure your OpenAI API key as a secret for the sampleapp:Bash1. In the Program.cs file, add the following code to connect and authenticate to the AImodel.C#dotnet add package Microsoft.Extensions.Configuration.UserSecretscode .Configure the appdotnet user-secrets initdotnet user-secrets set OpenAIKey dotnet user-secrets set ModelName Add the app code// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.using Microsoft.Extensions.Configuration;using OpenAI.Images;// Retrieve the local secrets that were set from the command line, using:// dotnet user-secrets init// dotnet user-secrets set OpenAIKey var config = new ConfigurationBuilder().AddUserSecrets().Build();string key = config["OpenAIKey"];string modelName = config["ModelName"];// Create the OpenAI ImageClientImageClient client = new(modelName, key);// Generate the imageGeneratedImage generatedImage = await client.GenerateImageAsync(""" A postal card with a happy hiker waving and a beautiful mountain in the The preceding code:Reads essential configuration values from the project user secrets to connect to theAI model.Creates an OpenAI.Images.ImageClient to connect to the AI model.Sends a prompt to the model that describes the desired image.Prints the URL of the generated image to the console output.2. Run the app:.NET CLINavigate to the image URL in the console output to view the generated image. Customizethe text content of the prompt to create new images or modify the original.Quickstart - Build an AI chat app with .NETGenerate text and conversations with .NET and Azure OpenAI Completionsbackground. There is a trail visible in the foreground. The postal card has text in red saying: 'You are invited for a hike!' """, new ImageGenerationOptions { Size = GeneratedImageSize.W1024xH1024 });Console.WriteLine($"The generated image is ready at:\n{generatedImage.ImageUri}");dotnet runNext stepsChat with a local AI model using .NET05/29/2025In this quickstart, you learn how to create a conversational .NET console chat app using anOpenAI or Azure OpenAI model. The app uses the Microsoft.Extensions.AI library so you canwrite code using AI abstractions rather than a specific SDK. AI abstractions enable you tochange the underlying AI model with minimal code changes.Install .NET 8.0 or higherInstall Ollama locally on your deviceVisual Studio Code (optional)Complete the following steps to configure and run a local AI model on your device. Manydifferent AI models are available to run locally and are trained for different tasks, such asgenerating code, analyzing images, generative chat, or creating embeddings. For thisquickstart, you'll use the general purpose phi3:mini model, which is a small but capablegenerative AI created by Microsoft.1. Open a terminal window and verify that Ollama is available on your device:BashIf Ollama is available, it displays a list of available commands.2. Start Ollama:BashIf Ollama is running, it displays a list of available commands.3. Pull the phi3:mini model from the Ollama registry and wait for it to download:BashPrerequisitesRun the local AI modelollamaollama serve4. After the download completes, run the model:BashOllama starts the phi3:mini model and provides a prompt for you to interact with it.Complete the following steps to create a .NET console app that connects to your localphi3:mini AI model.1. In a terminal window, navigate to an empty directory on your device and create a newapp with the dotnet new command:.NET CLI2. Add the OllamaSharp package to your app:.NET CLI3. Open the new app in your editor of choice, such as Visual Studio Code..NET CLIThe Semantic Kernel SDK provides many services and features to connect to AI models andmanage interactions. In the steps ahead, you'll create a simple app that connects to the local AIand stores conversation history to improve the chat experience.1. Open the Program.cs file and replace the contents of the file with the following code:ollama pull phi3:miniollama run phi3:miniCreate the .NET appdotnet new console -o LocalAIdotnet add package OllamaSharpcode .Connect to and chat with the AI modelC#The preceding code accomplishes the following:Creates an OllamaChatClient that implements the IChatClient interface.This interface provides a loosely coupled abstraction you can use to chat with AIModels.You can later change the underlying chat client implementation to anothermodel, such as Azure OpenAI, without changing any other code.Creates a ChatHistory object to store the messages between the user and the AImodel.Retrieves a prompt from the user and stores it in the ChatHistory.Sends the chat data to the AI model to generate a response.using Microsoft.Extensions.AI;using OllamaSharp;IChatClient chatClient = new OllamaApiClient(new Uri("http://localhost:11434/"), "phi3:mini");// Start the conversation with context for the AI modelList chatHistory = new();while (true){ // Get user prompt and add to chat history Console.WriteLine("Your prompt:"); var userPrompt = Console.ReadLine(); chatHistory.Add(new ChatMessage(ChatRole.User, userPrompt)); // Stream the AI response and add to chat history Console.WriteLine("AI Response:"); var response = ""; await foreach (ChatResponseUpdate item in chatClient.GetStreamingResponseAsync(chatHistory)) { Console.Write(item.Text); response += item.Text; } chatHistory.Add(new ChatMessage(ChatRole.Assistant, response)); Console.WriteLine();}7 NoteOllama runs on port 11434 by default, which is why the AI model endpoint is set tohttp://localhost:11434.2. Run the app and enter a prompt into the console to receive a response from the AI, suchas the following:Output3. The response from the AI is accurate, but also verbose. The stored chat history enablesthe AI to modify its response. Instruct the AI to shorten the list it provided:OutputYour prompt:Tell me three facts about .NET.AI response:1. **Cross-Platform Development:** One of the significant strengths of .NET,particularly its newer iterations (.NET Core and .NET 5+), is cross-platform support.It allows developers to build applications that run on Windows, Linux, macOS,and various other operating systems seamlessly, enhancing flexibility andreducing barriers for a wider range of users.2. **Rich Ecosystem and Library Support:** .NET has a rich ecosystem,comprising an extensive collection of libraries (such as those provided by theofficial NuGet Package Manager), tools, and services. This allows developersto work on web applications (.NET for desktop apps and ASP.NET Corefor modern web applications), mobile applications (.NET MAUI),IoT solutions, AI/ML projects, and much more with a vast array of prebuiltcomponents available at their disposal.3. **Type Safety:** .NET operates under the Common Language Infrastructure (CLI)model and employs managed code for executing applications. This approach inherentlyoffers strong type safety checks which help in preventing many runtime errors thatare common in languages like C/C++. It also enables features such as garbage collection,thus relieving developers from manual memory management. These characteristics enhancethe reliability of .NET-developed software and improve productivity by catchingissues early during development.Your prompt:Shorten the length of each item in the previous response.AI Response: **Cross-platform Capabilities:** .NET allows building for various operating systemsthrough platforms like .NET Core, promoting accessibility (Windows, Linux, macOS).The updated response from the AI is much shorter the second time. Due to the availablechat history, the AI was able to assess the previous result and provide shorter summaries.Generate text and conversations with .NET and Azure OpenAI Completions**Extensive Ecosystem:** Offers a vast library selection via NuGet and tools for web(.NET Framework), mobile development (.NET MAUI), IoT, AI, providing richcapabilities to developers.**Type Safety & Reliability:** .NET's CLI model enforces strong typing and automaticgarbage collection, mitigating runtime errors, thus enhancing application stability.Next stepsCreate a minimal AI assistant using .NETArticle•02/28/2025In this quickstart, you'll learn how to create a minimal AI assistant using the OpenAI orAzure OpenAI SDK libraries. AI assistants provide agentic functionality to help userscomplete tasks using AI tools and models. In the sections ahead, you'll learn thefollowing:Core components and concepts of AI assistantsHow to create an assistant using the Azure OpenAI SDKHow to enhance and customize the capabilities of an assistantInstall .NET 8.0 or higherVisual Studio Code (optional)Visual Studio (optional)An access key for an OpenAI modelAI assistants are based around conversational threads with a user. The user sendsprompts to the assistant on a conversation thread, which direct the assistant tocomplete tasks using the tools it has available. Assistants can process and analyze data,make decisions, and interact with users or other systems to achieve specific goals. Mostassistants include the following components:ComponentDescriptionAssistantThe core AI client and logic that uses Azure OpenAI models, manages conversationthreads, and utilizes configured tools.ThreadA conversation session between an assistant and a user. Threads store messagesand automatically handle truncation to fit content into a model's context.MessageA message created by an assistant or a user. Messages can include text, images,and other files. Messages are stored as a list on the thread.RunActivation of an assistant to begin running based on the contents of the thread.The assistant uses its configuration and the thread's messages to perform tasks byPrerequisitesCore components of AI assistantsノExpand tableComponentDescriptioncalling models and tools. As part of a run, the assistant appends messages to thethread.Run stepsA detailed list of steps the assistant took as part of a run. An assistant can call toolsor create messages during its run. Examining run steps allows you to understandhow the assistant is getting to its final results.Assistants can also be configured to use multiple tools in parallel to complete tasks,including the following:Code interpreter tool: Writes and runs code in a sandboxed executionenvironment.Function calling: Runs local custom functions you define in your code.File search capabilities: Augments the assistant with knowledge from outside itsmodel.By understanding these core components and how they interact, you can build andcustomize powerful AI assistants to meet your specific needs.Complete the following steps to create a .NET console app and add the package neededto work with assistants:1. In a terminal window, navigate to an empty directory on your device and create anew app with the dotnet new command:.NET CLI2. Add the OpenAI package to your app:.NET CLI3. Open the new app in your editor of choice, such as Visual Studio Code..NET CLICreate the .NET appdotnet new console -o AIAssistantdotnet package add OpenAI --prereleasecode .1. Open the Program.cs file and replace the contents of the file with the followingcode to create the required clients:C#2. Create an in-memory sample document and upload it to the OpenAIFileClient:C#Create the AI assistant clientusing OpenAI;using OpenAI.Assistants;using OpenAI.Files;using Azure.AI.OpenAI;using Azure.Identity;// Create the OpenAI clientOpenAIClient openAIClient = new("your-apy-key");// For Azure OpenAI, use the following client instead:AzureOpenAIClient azureAIClient = new( new Uri("your-azure-openai-endpoint"), new DefaultAzureCredential());#pragma warning disable OPENAI001AssistantClient assistantClient = openAIClient.GetAssistantClient();OpenAIFileClient fileClient = openAIClient.GetOpenAIFileClient();// Create an in-memory document to upload to the file clientusing Stream document = BinaryData.FromBytes(""" { "description": "This document contains the sale history data for Contoso products.", "sales": [ { "month": "January", "by_product": { "113043": 15, "113045": 12, "113049": 2 } }, { "month": "February", "by_product": { "113045": 22 } }, { "month": "March",3. Enable file search and code interpreter tooling capabilities via theAssistantCreationOptions:C#4. Create the Assistant and a thread to manage interactions between the user andthe assistant: "by_product": { "113045": 16, "113055": 5 } } ] } """u8.ToArray()).ToStream();// Upload the document to the file clientOpenAIFile salesFile = fileClient.UploadFile( document, "monthly_sales.json", FileUploadPurpose.Assistants);// Configure the assistant optionsAssistantCreationOptions assistantOptions = new(){ Name = "Example: Contoso sales RAG", Instructions = "You are an assistant that looks up sales data and helps visualize the information based" + " on user queries. When asked to generate a graph, chart, or other visualization, use" + " the code interpreter tool to do so.", Tools = { new FileSearchToolDefinition(), // Enable the assistant to search and access files new CodeInterpreterToolDefinition(), // Enable the assistant to run code for data analysis }, ToolResources = new() { FileSearch = new() { NewVectorStores = { new VectorStoreCreationHelper([salesFile.Id]), } } },};C#5. Print the messages and save the generated image from the conversation with theassistant:C#// Create the assistantAssistant assistant = assistantClient.CreateAssistant("gpt-4o", assistantOptions);// Configure and create the conversation threadThreadCreationOptions threadOptions = new(){ InitialMessages = { "How well did product 113045 sell in February? Graph its trend over time." }};ThreadRun threadRun = assistantClient.CreateThreadAndRun(assistant.Id, threadOptions);// Sent the prompt and monitor progress until the thread run is completedo{ Thread.Sleep(TimeSpan.FromSeconds(1)); threadRun = assistantClient.GetRun(threadRun.ThreadId, threadRun.Id);}while (!threadRun.Status.IsTerminal);// Get the messages from the thread runvar messages = assistantClient.GetMessagesAsync( threadRun.ThreadId, new MessageCollectionOptions() { Order = MessageCollectionOrder.Ascending });await foreach (ThreadMessage message in messages){ // Print out the messages from the assistant Console.Write($"[{message.Role.ToString().ToUpper()}]: "); foreach (MessageContent contentItem in message.Content) { if (!string.IsNullOrEmpty(contentItem.Text)) { Console.WriteLine($"{contentItem.Text}"); if (contentItem.TextAnnotations.Count > 0) { Console.WriteLine();Locate and open the saved image in the app bin directory, which should resemblethe following: } // Include annotations, if any foreach (TextAnnotation annotation in contentItem.TextAnnotations) { if (!string.IsNullOrEmpty(annotation.InputFileId)) { Console.WriteLine($"* File citation, file ID: {annotation.InputFileId}"); } if (!string.IsNullOrEmpty(annotation.OutputFileId)) { Console.WriteLine($"* File output, new file ID: {annotation.OutputFileId}"); } } } // Save the generated image file if (!string.IsNullOrEmpty(contentItem.ImageFileId)) { OpenAIFile imageInfo = fileClient.GetFile(contentItem.ImageFileId); BinaryData imageBytes = fileClient.DownloadFile(contentItem.ImageFileId); using FileStream stream = File.OpenWrite($"{imageInfo.Filename}.png"); imageBytes.ToStream().CopyTo(stream); Console.WriteLine($""); } } Console.WriteLine();}Generate text and conversations with .NET and Azure OpenAI CompletionsNext stepsCreate a .NET AI app to chat with customdata using the AI app template extensions08/01/2025In this quickstart, you learn how to create a .NET AI app to chat with custom data using the.NET AI app template. The template is designed to streamline the getting started experiencefor building AI apps with .NET by handling common setup tasks and configurations for you..NET 9.0 SDKOne of the following IDEs (optional):Visual Studio 2022Visual Studio Code with C# Dev KitThe AI Chat Web App template is available as a template package through NuGet. Use thedotnet new install command to install the package:.NET CLIAfter you install the AI app templates, you can use them to create starter apps through VisualStudio UI, Visual Studio Code, or the .NET CLI.1. Inside Visual Studio, navigate to File > New > Project.2. On the Create a new project screen, search for AI Chat Web App. Select thematching result and then choose Next.3. On the Configure your new project screen, enter the desired name and location foryour project and then choose Next.4. On the Additional information screen:For the Framework option, select .NET 9.0.PrerequisitesInstall the .NET AI app templatedotnet new install Microsoft.Extensions.AI.TemplatesCreate the .NET AI appVisual StudioFor the AI service provider option, select GitHub Models.For the Vector store option, select Local on-disc (for prototyping).5. Select Create to complete the process.The sample app you created is a Blazor Interactive Server web app preconfigured with commonAI and data services. The app handles the following concerns for you:Includes essential Microsoft.Extensions.AI packages and other dependencies in thecsproj file to help you get started working with AI.Creates various AI services and registers them for dependency injection in the Program.csfile:An IChatClient service to chat back and forth with the generative AI modelAn IEmbeddingGenerator service that's used to generate embeddings, which areessential for vector search functionalityA JsonVectorStore to act as an in-memory vector storeRegisters a SQLite database context service to handle ingesting documents. The app ispreconfigured to ingest whatever documents you add to the Data folder of the project,including the provided example files.Provides a complete chat UI using Blazor components. The UI handles rich formatting forthe AI responses and provides features such as citations for response data.To authenticate to GitHub models from your code, you'll need to create a GitHub personalaccess token:1. Navigate to the Personal access tokens page of your GitHub account settings underDeveloper Settings.2. Select Generate new token.3. Enter a name for the token, and under Permissions, set Models to Access: Read-only.4. Select Generate token at the bottom of the page.5. Copy the token for use in the steps ahead.The AI Chat Web App app is almost ready to go as soon as it's created. However, you need toconfigure the app to use the personal access token you set up for GitHub Models. By default,Explore the sample appConfigure access to GitHub ModelsConfigure the appthe app template searches for this value in the project's local .NET user secrets. You canmanage user secrets using either the Visual Studio UI or the .NET CLI.1. In Visual Studio, right-click on your project in the Solution Explorer and selectManage User Secrets. This opens a secrets.json file where you can store your APIkeys without them being tracked in source control.2. Add the following key and value:JSONBy default, the app template uses the gpt-4o-mini and text-embedding-3-small models. To tryother models, update the name parameters in Program.cs:C#1. Select the run button at the top of Visual Studio to launch the app. After a moment, youshould see the following UI load in the browser:Visual Studio{ "GitHubModels:Token": ""}var chatClient = ghModelsClient.AsChatClient("gpt-4o-mini");var embeddingGenerator = ghModelsClient.AsEmbeddingGenerator("text-embedding-3-small");Run and test the app2. Enter a prompt into the input box such as "What are some essential tools in the survivalkit?" to ask your AI model a question about the ingested data from the example files.The app responds with an answer to the question and provides citations of where it foundthe data. You can click on one of the citations to be directed to the relevant section of theexample files.Generate text and conversations with .NET and Azure OpenAI CompletionsNext stepsCreate a minimal MCP server using C# andpublish to NuGet07/15/2025In this quickstart, you create a minimal Model Context Protocol (MCP) server using the C# SDKfor MCP, connect to it using GitHub Copilot, and publish it to NuGet. MCP servers areservices that expose capabilities to clients through the Model Context Protocol (MCP)..NET 10.0 SDK (preview 6 or higher)Visual Studio CodeGitHub Copilot extension for Visual Studio CodeNuGet.org account1. In a terminal window, install the MCP Server template (version 9.7.0-preview.2.25356.2 ornewer):Bash2. Create a new MCP server app with the dotnet new mcpserver command:Bash3. Navigate to the SampleMcpServer directory:Bash7 NoteThe Microsoft.Extensions.AI.Templates experience is currently in preview. The templateuses the ModelContextProtocol library and the MCP registry server.json schema,which are both in preview.PrerequisitesCreate the projectdotnet new install Microsoft.Extensions.AI.Templatesdotnet new mcpserver -n SampleMcpServer4. Build the project:Bash5. Update the in the .csproj file to be unique on NuGet.org, for example.SampleMcpServer.Configure GitHub Copilot for Visual Studio Code to use your custom MCP server:1. If you haven't already, open your project folder in Visual Studio Code.2. Create a .vscode folder at the root of your project.3. Add an mcp.json file in the .vscode folder with the following content:JSON4. Save the file.The MCP server template includes a tool called get_random_number you can use for testing andas a starting point for development.cd SampleMcpServerdotnet buildConfigure the MCP server in Visual Studio Code{ "servers": { "SampleMcpServer": { "type": "stdio", "command": "dotnet", "args": [ "run", "--project", "" ] } }}Test the MCP server1. Open GitHub Copilot in Visual Studio Code and switch to chat mode.2. Select the Select tools icon to verify your SampleMcpServer is available with the sampletool listed.3. Enter a prompt to run the get_random_number tool:Console4. GitHub Copilot requests permission to run the get_random_number tool for yourprompt. Select Continue or use the arrow to select a more specific behavior:Current session always runs the operation in the current GitHub Copilot AgentMode session.Current workspace always runs the command for the current Visual Studio Codeworkspace.Always allow sets the operation to always run for any GitHub Copilot Agent Modesession or any Visual Studio Code workspace.Give me a random number between 1 and 100.5. Verify that the server responds with a random number:OutputIn this example, you enhance the MCP server to use a configuration value set in anenvironment variable. This could be configuration needed for the functioning of your MCPserver, such as an API key, an endpoint to connect to, or a local directory path.1. Add another tool method after the GetRandomNumber method inTools/RandomNumberTools.cs. Update the tool code to use an environment variable.C#2. Update the .vscode/mcp.json to set the WEATHER_CHOICES environment variable fortesting.JSONYour random number is 42.Add inputs and configuration options[McpServerTool][Description("Describes random weather in the provided city.")]public string GetCityWeather( [Description("Name of the city to return weather for")] string city){ // Read the environment variable during tool execution. // Alternatively, this could be read during startup and passed via IOptions dependency injection var weather = Environment.GetEnvironmentVariable("WEATHER_CHOICES"); if (string.IsNullOrWhiteSpace(weather)) { weather = "balmy,rainy,stormy"; } var weatherChoices = weather.Split(","); var selectedWeatherIndex = Random.Shared.Next(0, weatherChoices.Length); return $"The weather in {city} is {weatherChoices[selectedWeatherIndex]}.";}{ "servers": { "SampleMcpServer": { "type": "stdio",3. Try another prompt with Copilot in VS Code, such as:ConsoleVS Code should return a random weather description.4. Update the .mcp/server.json to declare your environment variable input. Theserver.json file schema is defined by the MCP Registry project and is used byNuGet.org to generate VS Code MCP configuration.Use the environment_variables property to declare environment variables used byyour app that will be set by the client using the MCP server (for example, VS Code).Use the package_arguments property to define CLI arguments that will be passed toyour app. For more examples, see the MCP Registry project.JSON "command": "dotnet", "args": [ "run", "--project", "" ], "env": { "WEATHER_CHOICES": "sunny,humid,freezing" } } } }What is the weather in Redmond, Washington?{ "$schema": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.json", "description": "", "name": "io.github./", "packages": [ { "registry_name": "nuget", "name": "", "version": "", "package_arguments": [], "environment_variables": [ { "name": "WEATHER_CHOICES", "value": "{weather_choices}", "variables": {The only information used by NuGet.org in the server.json is the first packages arrayitem with the registry_name value matching nuget. The other top-level properties asidefrom the packages property are currently unused and are intended for the upcomingcentral MCP Registry. You can leave the placeholder values until the MCP Registry is liveand ready to accept MCP server entries.You can test your MCP server again before moving forward.1. Pack the project:Bash2. Publish the package to NuGet:BashIf you want to test the publishing flow before publishing to NuGet.org, you can registeran account on the NuGet Gallery integration environment: https://int.nugettest.org. Thepush command would be modified to: "weather_choices": { "description": "Comma separated list of weather descriptions to randomly select.", "is_required": true, "is_secret": false } } } ] } ], "repository": { "url": "https://github.com//", "source": "github" }, "version_detail": { "version": "" }}Pack and publish to NuGetdotnet pack -c Releasedotnet nuget push bin/Release/*.nupkg --api-key --source https://api.nuget.org/v3/index.jsonBashFor more information, see Publish a package.1. Search for your MCP server package on NuGet.org (or int.nugettest.org if youpublished to the integration environment) and select it from the list.2. View the package details and copy the JSON from the "MCP Server" tab.dotnet nuget push bin/Release/*.nupkg --api-key --source https://apiint.nugettest.org/v3/index.jsonDiscover MCP servers on NuGet.org3. In your mcp.json file in the .vscode folder, add the copied JSON, which looks like this:JSON{ "inputs": [ { "type": "promptString", "id": "weather_choices", "description": "Comma separated list of weather descriptions to randomly select.", "password": false } ], "servers": { "Contoso.SampleMcpServer": { "type": "stdio", "command": "dnx", "args": ["Contoso.SampleMcpServer@0.0.1-beta", "--yes"], "env": { "WEATHER_CHOICES": "${input:weather_choices}" }If you published to the NuGet Gallery integration environment, you need to add "--add-source", "https://apiint.nugettest.org/v3/index.json" at the end of the "args" array.4. Save the file.5. In GitHub Copilot, select the Select tools icon to verify your SampleMcpServer isavailable with the tools listed.6. Enter a prompt to run the new get_city_weather tool:Console7. If you added inputs to your MCP server (for example, WEATHER_CHOICES), you will beprompted to provide values.8. Verify that the server responds with the random weather:OutputIf VS Code shows this error when starting the MCP server, you need to install a compatibleversion of the .NET SDK. } }}What is the weather in Redmond?The weather in Redmond is balmy.Common issuesThe command "dnx" needed to run SampleMcpServer wasnot found.The dnx command is shipped as part of the .NET SDK, starting with version 10 preview 6. Installthe .NET 10 SDK to resolve this issue.Generally speaking, an AI agent like GitHub Copilot is informed that it has some tools availableby the client application, such as VS Code. Some tools, such as the sample random numbertool, might not be leveraged by the AI agent because it has similar functionality built in.If your tool is not being used, check the following:1. Verify that your tool appears in the list of tools that VS Code has enabled. See thescreenshot in Test the MCP server for how to check this.2. Explicitly reference the name of the tool in your prompt. In VS Code, you can referenceyour tool by name. For example, Using #get_random_weather, what is the weather inRedmond?.3. Verify your MCP server is able to start. You can check this by clicking the "Start" buttonvisible above your MCP server configuration in the VS Code user or workspace settings.GitHub Copilot does not use your tool (an answer is providedwithout invoking your tool).Related contentGet started with .NET AI and the Model Context ProtocolModel Context Protocol .NET samplesBuild a minimal MCP clientPublish a packageFind and evaluate NuGet packages for your projectWhat's new in .NET 10Create a minimal MCP client using .NETArticle•05/30/2025In this quickstart, you build a minimal Model Context Protocol (MCP) client using the C# SDKfor MCP. You also learn how to configure the client to connect to an MCP server, such as theone created in the Build a minimal MCP server quickstart..NET 8.0 SDK or higherVisual Studio CodeComplete the following steps to create a .NET console app. The app acts as a host for an MCPclient that connects to an MCP server.1. In a terminal window, navigate to the directory where you want to create your app, andcreate a new console app with the dotnet new command:Console2. Navigate into the newly created project folder:Console3. Run the following commands to add the necessary NuGet packages:Prerequisites7 NoteThe MCP client you build in the sections ahead connects to the sample MCP server fromthe Build a minimal MCP server quickstart. You can also use your own MCP server if youprovide your own connection configuration.Create the .NET host appCreate the projectdotnet new console -n MCPHostAppcd MCPHostAppConsole4. Open the project folder in your editor of choice, such as Visual Studio Code:ConsoleReplace the contents of Program.cs with the following code:C#dotnet add package Azure.AI.OpenAI --prereleasedotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package ModelContextProtocol --prereleasecode .Add the app codeusing Azure.AI.OpenAI;using Azure.Identity;using Microsoft.Extensions.AI;using ModelContextProtocol.Client;using ModelContextProtocol.Protocol.Transport;// Create an IChatClient using Azure OpenAI.IChatClient client = new ChatClientBuilder( new AzureOpenAIClient(new Uri(""), new DefaultAzureCredential()) .GetChatClient("gpt-4o").AsIChatClient()) .UseFunctionInvocation() .Build();// Create the MCP client// Configure it to start and connect to your MCP server.var mcpClient = await McpClientFactory.CreateAsync( new StdioClientTransport(new() { Command = "dotnet run", Arguments = ["--project", ""], Name = "Minimal MCP Server", }));// List all available tools from the MCP server.Console.WriteLine("Available tools:");var tools = await mcpClient.ListToolsAsync();foreach (var tool in tools){The preceding code accomplishes the following tasks:Initializes an IChatClient abstraction using the Microsoft.Extensions.AI libraries.Creates an MCP client and configures it to connect to your MCP server.Retrieves and displays a list of available tools from the MCP server, which is a standardMCP function.Implements a conversational loop that processes user prompts and utilizes the tools forresponses.Complete the following steps to test your .NET host app:1. In a terminal window open to the root of your project, run the following command tostart the app:Console2. Once the app is running, enter a prompt to run the ReverseEcho tool:Console Console.WriteLine($"{tool}");}Console.WriteLine();// Conversational loop that can utilize the tools via prompts.List messages = [];while (true){ Console.Write("Prompt: "); messages.Add(new(ChatRole.User, Console.ReadLine())); List updates = []; await foreach (var update in client .GetStreamingResponseAsync(messages, new() { Tools = [.. tools] })) { Console.Write(update); updates.Add(update); } Console.WriteLine(); messages.AddMessages(updates);}Run and test the appdotnet run3. Verify that the server responds with the echoed message:OutputGet started with .NET AI and the Model Context ProtocolReverse the following: "Hello, minimal MCP server!"!revres PCM laminim ,olleHRelated contentHow generative AI and LLMs work05/29/2025Generative AI is a type of artificial intelligence capable of creating original content, such asnatural language, images, audio, and code. The output of a generative AI is based on theinputs provided by the user. One common way for users to interact with generative AI isthrough chat applications that use natural language as their input. ChatGPT, developed byOpenAI, is a popular example of this. Generative AI applications that use natural language asan input are powered by large language models (LLMs) to perform natural languageprocessing (NLP).All generative AI is built on top of models. These models are trained with large sets of data inthe form of content, such as natural language, images, audio, and code. Generative AI modelsuse the patterns identified in the training data to produce new, statistically similar content.The input provided by the user is used by the AI model to build an output. The input is firstparsed into a form of data that the model can understand. The model then uses that data toidentify matching patterns from its training that it combines to build the final output.Generative AI models are designed to produce unique content, so they won't generate thesame output for identical inputs.Generative AI applications that support natural language as an input or output utilize LLMs todo so. The LLM is used to perform NLP, which classifies the input text and determines itssentiment. That classification and sentiment analysis is used by the generative AI model toidentify patterns and build the output. If the output is text, the LLM alone can be used togenerate it. If the output is audio or images, additional models are used to provide the dataand patterns for generating outputs in that format.Generative AI applications support a variety of potential use cases and potential outputs, whichare explored in the following sections.Some generative AI applications can produce natural language outputs, such as:Professionally worded summaries for a LinkedIn profileHow generative AI worksCommon uses of generative AINatural language generationRich descriptions of items in an online storefrontIdeas for healthy mealsFor example, given the user input Give me three ideas for a healthy breakfast including peppers,a generative AI application might produce the following output:OK, here are three healthy breakfasts that include peppers:1. Egg and Pepper Scramble: Dice up some bell peppers and sauté them in a pan until they'reslightly softened. Then, add in some beaten eggs and scramble everything together. Servewith whole-grain toast for a nutritious breakfast.2. Pepper and Avocado Toast: Toast a slice of whole-grain bread and top it with sliced bellpeppers, mashed avocado, and a sprinkle of salt and pepper. This is a great way to get somehealthy fats from the avocado along with the vitamin C from the peppers.3. Breakfast Burrito with Peppers: Sauté some diced bell peppers, onions, and scrambled eggstogether in a pan. Then, spoon the mixture onto a whole-grain tortilla and top with somesalsa or hot sauce. Roll it up and enjoy a satisfying and nutritious breakfast.Some generative AI applications produce image outputs from natural language inputs.Depending on the application and its models, users might be able to specify:The people or things to appear the imageThe artistic style to create the image inReferences for generating similar imagesImage generation can create virtual avatars for online accounts, design logos for a business, orprovide artistic inspiration for creators. For example, a user may input the request, Create animage of an elephant eating a burger. A generative AI application might produce the followingoutput:Image generationSome generative AI applications produce audio outputs from natural language inputs.Depending on the application and its models, users might be able to:Synthesize natural sounding voices from input textCreate music in a specific style or featuring certain instrumentsModify input audio files based on a set criteria provided in natural languageAudio generation can provide spoken responses from digital voice assistants, add backinginstruments to songs for music production, or reproduce a user's original voice from referencerecordings.Some generative AI applications produce code from natural language inputs. Depending onthe application and its models, users might be able to generate code that:Is in the language of their choiceAccepts a specific input and output structureUses specific technologies based on their reference documentationCode generation can provide quick implementations of common operations, such as sort orfilter data, speed up translating code from one language to another, or answer questions abouta technology based on specified reference documentation. For example, given the input "Showme how to code a game of tic-tac-toe with C#", a generative AI application might produce thefollowing output:Audio generationCode generationHere's a simple example of how you can code a game of tic-tac-toe in C#:C#This code creates a simple console-based tic-tac-toe game in C#. It uses a single-dimensionalarray to represent the board and checks for a win or draw after each move.When training an LLM, the training text is first broken down into tokens. Each token identifies aunique text value. A token can be a distinct word, a partial word, or a combination of wordsand punctuation. Each token is assigned an ID, which enables the text to be represented as asequence of token IDs.After the text has been broken down into tokens, a contextual vector, known as an embedding,is assigned to each token. These embedding vectors are multi-valued numeric data where eachelement of a token's vector represents a semantic attribute of the token. The elements of atoken's vector are determined based on how commonly tokens are used together or in similarcontexts.using System;namespace TicTacToe{ class Program { static char[] board = { '1', '2', '3', '4', '5', '6', '7', '8', '9' }; static int player = 1; // Player 1 will start static int choice; // The number the player chooses static int flag = 0; // Set the flag value to 0 // Check if the position is already marked or not private static int CheckPosition(char mark) { for (int i = 0; i < 9; i++) { if (board[i] == mark) { return 1; } } return 0; } // The rest of the generated code has been omitted for brevity // ... }}How LLMs workThe goal is to predict the next token in the sequence based on the preceding tokens. A weightis assigned to each token in the existing sequence that represents its relative influence on thenext token. A calculation is then performed that uses the preceding tokens' weights andembeddings to predict the next vector value. The model then selects the most probable tokento continue the sequence based on the predicted vector.This process continues iteratively for each token in the sequence, with the output sequencebeing used regressively as the input for the next iteration. The output is built one token at atime. This strategy is analogous to how auto-complete works, where suggestions are based onwhat's been typed so far and updated with each new input.During training, the complete sequence of tokens is known, but all tokens that come after theone currently being considered are ignored. The predicted value for the next token's vector iscompared to the actual value and the loss is calculated. The weights are then incrementallyadjusted to reduce the loss and improve the model.Understand TokensPrompt engineeringLarge language modelsRelated contentUnderstand tokens05/29/2025Tokens are words, character sets, or combinations of words and punctuation that are generatedby large language models (LLMs) when they decompose text. Tokenization is the first step intraining. The LLM analyzes the semantic relationships between tokens, such as how commonlythey're used together or whether they're used in similar contexts. After training, the LLM usesthose patterns and relationships to generate a sequence of output tokens based on the inputsequence.The set of unique tokens that an LLM is trained on is known as its vocabulary.For example, consider the following sentence:I heard a dog bark loudly at a catThis text could be tokenized as:IheardadogbarkloudlyatacatBy having a sufficiently large set of training text, tokenization can compile a vocabulary ofmany thousands of tokens.The specific tokenization method varies by LLM. Common tokenization methods include:Word tokenization (text is split into individual words based on a delimiter)Character tokenization (text is split into individual characters)Subword tokenization (text is split into partial words or character sets)Turn text into tokensCommon tokenization methodsFor example, the GPT models, developed by OpenAI, use a type of subword tokenization that'sknown as Byte-Pair Encoding (BPE). OpenAI provides a tool to visualize how text will betokenized.There are benefits and disadvantages to each tokenization method:Token sizeProsConsSmaller tokens(character or subwordtokenization)- Enables the model to handle a widerrange of inputs, such as unknownwords, typos, or complex syntax.- Might allow the vocabulary size tobe reduced, requiring fewer memoryresources.- A given text is broken into moretokens, requiring additionalcomputational resources whileprocessing.- Given a fixed token limit, themaximum size of the model's inputand output is smaller.Larger tokens (wordtokenization)- A given text is broken into fewertokens, requiring fewer computationalresources while processing.- Given the same token limit, themaximum size of the model's inputand output is larger.- Might cause an increased vocabularysize, requiring more memoryresources.- Can limit the models ability tohandle unknown words, typos, orcomplex syntax.After the LLM completes tokenization, it assigns an ID to each unique token.Consider our example sentence:I heard a dog bark loudly at a catAfter the model uses a word tokenization method, it could assign token IDs as follows:I (1)heard (2)a (3)dog (4)bark (5)loudly (6)at (7)a (the "a" token is already assigned an ID of 3)cat (8)ノExpand tableHow LLMs use tokensBy assigning IDs, text can be represented as a sequence of token IDs. The example sentencewould be represented as [1, 2, 3, 4, 5, 6, 7, 3, 8]. The sentence "I heard a cat" would berepresented as [1, 2, 3, 8].As training continues, the model adds any new tokens in the training text to its vocabulary andassigns it an ID. For example:meow (9)run (10)The semantic relationships between the tokens can be analyzed by using these token IDsequences. Multi-valued numeric vectors, known as embeddings, are used to represent theserelationships. An embedding is assigned to each token based on how commonly it's usedtogether with, or in similar contexts to, the other tokens.After it's trained, a model can calculate an embedding for text that contains multiple tokens.The model tokenizes the text, then calculates an overall embeddings value based on thelearned embeddings of the individual tokens. This technique can be used for semanticdocument searches or adding vector stores to an AI.During output generation, the model predicts a vector value for the next token in thesequence. The model then selects the next token from its vocabulary based on this vectorvalue. In practice, the model calculates multiple vectors by using various elements of theprevious tokens' embeddings. The model then evaluates all potential tokens from these vectorsand selects the most probable one to continue the sequence.Output generation is an iterative operation. The model appends the predicted token to thesequence so far and uses that as the input for the next iteration, building the final output onetoken at a time.LLMs have limitations regarding the maximum number of tokens that can be used as input orgenerated as output. This limitation often causes the input and output tokens to be combinedinto a maximum context window. Taken together, a model's token limit and tokenizationmethod determine the maximum length of text that can be provided as input or generated asoutput.For example, consider a model that has a maximum context window of 100 tokens. The modelprocesses the example sentences as input text:I heard a dog bark loudly at a catToken limitsBy using a word-based tokenization method, the input is nine tokens. This leaves 91 wordtokens available for the output.By using a character-based tokenization method, the input is 34 tokens (including spaces). Thisleaves only 66 character tokens available for the output.Generative AI services often use token-based pricing. The cost of each request depends on thenumber of input and output tokens. The pricing might differ between input and output. Forexample, see Azure OpenAI Service pricing.Generative AI services might also be limited regarding the maximum number of tokens perminute (TPM). These rate limits can vary depending on the service region and LLM. For moreinformation about specific regions, see Azure OpenAI Service quotas and limits.How generative AI and LLMs workUnderstand embeddingsWork with vector databasesToken-based pricing and rate limitingRelated contentEmbeddings in .NET05/29/2025Embeddings are the way LLMs capture semantic meaning. They are numeric representations ofnon-numeric data that an LLM can use to determine relationships between concepts. You canuse embeddings to help an AI model understand the meaning of inputs so that it can performcomparisons and transformations, such as summarizing text or creating images from textdescriptions. LLMs can use embeddings immediately, and you can store embeddings in vectordatabases to provide semantic memory for LLMs as-needed.This section lists the main use cases for embeddings.Use your own databases to generate embeddings for your data and integrate it with an LLM tomake it available for completions. This use of embeddings is an important component ofretrieval-augmented generation.Use embeddings to increase the amount of context you can fit in a prompt without increasingthe number of tokens required.For example, suppose you want to include 500 pages of text in a prompt. The number oftokens for that much raw text will exceed the input token limit, making it impossible to directlyinclude in a prompt. You can use embeddings to summarize and break down large amounts ofthat text into pieces that are small enough to fit in one input, and then assess the similarity ofeach piece to the entire raw text. Then you can choose a piece that best preserves the semanticmeaning of the raw text and use it in your prompt without hitting the token limit.Use embeddings to help a model understand the meaning and context of text, and thenclassify, summarize, or translate that text. For example, you can use embeddings to helpmodels classify texts as positive or negative, spam or not spam, or news or opinion.Use cases for embeddingsUse your own data to improve completion relevanceIncrease the amount of text you can fit in a promptPerform text classification, summarization, or translationGenerate and transcribe audioUse audio embeddings to process audio files or inputs in your app.For example, Azure AI Speech supports a range of audio embeddings, including speech to textand text to speech. You can process audio in real-time or in batches.Semantic image processing requires image embeddings, which most LLMs can't generate. Usean image-embedding model such as ViT to create vector embeddings for images. Then youcan use those embeddings with an image generation model to create or modify images usingtext or vice versa. For example, you can use the DALL·E model to generate images such aslogos, faces, animals, and landscapes.Use embeddings to help a model create code from text or vice versa, by converting differentcode or text expressions into a common representation. For example, you can use embeddingsto help a model generate or document code in C# or Python.You generate embeddings for your raw data by using an AI embedding model, which canencode non-numeric data into a vector (a long array of numbers). The model can also decodean embedding into non-numeric data that has the same or similar meaning as the original, rawdata. There are many embedding models available for you to use, with OpenAI's text-embedding-ada-002 model being one of the common models that's used. For more examples,see the list of Embedding models available on Azure OpenAI.After you generate embeddings, you'll need a way to store them so you can later retrieve themwith calls to an LLM. Vector databases are designed to store and process vectors, so they're anatural home for embeddings. Different vector databases offer different processingcapabilities, so you should choose one based on your raw data and your goals. For informationabout your options, see available vector database solutions.When building LLM-based applications, you can use Semantic Kernel to integrate embeddingmodels and vector stores, so you can quickly pull in text data, and generate and storeTurn text into images or images into textGenerate or document codeChoose an embedding modelStore and process embeddings in a vector databaseUsing embeddings in your LLM solutionembeddings. This lets you use a vector database solution to store and retrieve semanticmemories.How GenAI and LLMs workRetrieval-augmented generationTraining: Develop AI agents with Azure OpenAI and Semantic KernelRelated contentVector databases for .NET + AI05/29/2025Vector databases are designed to store and manage vector embeddings. Embeddings arenumeric representations of non-numeric data that preserve semantic meaning. Words,documents, images, audio, and other types of data can all be vectorized. You can useembeddings to help an AI model understand the meaning of inputs so that it can performcomparisons and transformations, such as summarizing text, finding contextually related data,or creating images from text descriptions.For example, you can use a vector database to:Identify similar images, documents, and songs based on their contents, themes,sentiments, and styles.Identify similar products based on their characteristics, features, and user groups.Recommend content, products, or services based on user preferences.Identify the best potential options from a large pool of choices to meet complexrequirements.Identify data anomalies or fraudulent activities that are dissimilar from predominant ornormal patterns.Vector databases provide vector search capabilities to find similar items based on their datacharacteristics rather than by exact matches on a property field. Vector search works byanalyzing the vector representations of your data that you created using an AI embeddingmodel such the Azure OpenAI embedding models. The search process measures the distancebetween the data vectors and your query vector. The data vectors that are closest to your queryvector are the ones that are found to be most similar semantically.Some services such as Azure Cosmos DB for MongoDB vCore provide native vector searchcapabilities for your data. Other databases can be enhanced with vector search by indexing thestored data using a service such as Azure AI Search, which can scan and index your data toprovide vector search capabilities.Vector databases and their search features are especially useful in RAG pattern workflows withAzure OpenAI. This pattern allows you to augment or enhance your AI model with additionalsemantically rich knowledge of your data. A common AI workflow using vector databases mightinclude the following steps:Understand vector searchVector search workflows with .NET and OpenAI1. Create embeddings for your data using an OpenAI embedding model.2. Store and index the embeddings in a vector database or search service.3. Convert user prompts from your application to embeddings.4. Run a vector search across your data, comparing the user prompt embedding to theembeddings your database.5. Use a language model such as GPT-35 or GPT-4 to assembly a user friendly completionfrom the vector search results.Visit the Implement Azure OpenAI with RAG using vector search in a .NET app tutorial for ahands-on example of this flow.Other benefits of the RAG pattern include:Generate contextually relevant and accurate responses to user prompts from AI models.Overcome LLM tokens limits - the heavy lifting is done through the database vectorsearch.Reduce the costs from frequent fine-tuning on updated data.AI applications often use data vector databases and services to improve relevancy and providecustomized functionality. Many of these services provide a native SDK for .NET, while othersoffer a REST service you can connect to through custom code. Semantic Kernel provides anextensible component model that enables you to use different vector stores without needing tolearn each SDK.Semantic Kernel provides connectors for the following vector databases and services:VectorserviceSemantic Kernel connector.NET SDKAzure AISearchMicrosoft.SemanticKernel.Connectors.AzureAISearchAzure.Search.DocumentsAzureCosmos DBfor NoSQLMicrosoft.SemanticKernel.Connectors.AzureCosmosDBNoSQLMicrosoft.Azure.CosmosAzureCosmos DBforMongoDBMicrosoft.SemanticKernel.Connectors.AzureCosmosDBMongoDBMongoDb.DriverAvailable vector database solutionsノExpand tableVectorserviceSemantic Kernel connector.NET SDKAzurePostgreSQLServerMicrosoft.SemanticKernel.Connectors.PostgresNpgsqlAzure SQLDatabaseMicrosoft.SemanticKernel.Connectors.SqlServerMicrosoft.Data.SqlClientChromaMicrosoft.SemanticKernel.Connectors.ChromaNADuckDBMicrosoft.SemanticKernel.Connectors.DuckDBDuckDB.NET.Data.FullMilvusMicrosoft.SemanticKernel.Connectors.MilvusMilvus.ClientMongoDBAtlasVectorSearchMicrosoft.SemanticKernel.Connectors.MongoDBMongoDb.DriverPineconeMicrosoft.SemanticKernel.Connectors.PineconeREST APIPostgresMicrosoft.SemanticKernel.Connectors.PostgresNpgsqlQdrantMicrosoft.SemanticKernel.Connectors.QdrantQdrant.ClientRedisMicrosoft.SemanticKernel.Connectors.RedisStackExchange.RedisWeaviateMicrosoft.SemanticKernel.Connectors.WeaviateREST APITo discover .NET SDK and API support, visit the documentation for each respective service.Implement Azure OpenAI with RAG using vector search in a .NET appMore Semantic Kernel .NET connectorsRelated contentPrompt engineering in .NETArticle•04/09/2025In this article, you explore essential prompt engineering concepts. Many AI models are prompt-based, meaning they respond to user input text (a prompt) with a response generated bypredictive algorithms (a completion). Newer models also often support completions in chatform, with messages based on roles (system, user, assistant) and chat history to preserveconversations.Consider this text generation example where prompt is the user input and completion is themodel output:Prompt: "The president who served the shortest term was "Completion: "Pedro Lascurain."The completion appears correct, but what if your app is supposed to help U.S. history students?Pedro Lascurain's 45-minute term is the shortest term for any president, but he served as thepresident of Mexico. The U.S. history students are probably looking for "William HenryHarrison". Clearly, the app could be more helpful to its intended users if you gave it somecontext.Prompt engineering adds context to the prompt by providing instructions, examples, and cuesto help the model produce better completions.Models that support text generation often don't require any specific format, but you shouldorganize your prompts so it's clear what's an instruction and what's an example. Models thatsupport chat-based apps use three roles to organize completions: a system role that controlsthe chat, a user role to represent user input, and an assistant role for responding to users.Divide your prompts into messages for each role:System messages give the model instructions about the assistant. A prompt can have onlyone system message, and it must be the first message.User messages include prompts from the user and show examples, historical prompts, orcontain instructions for the assistant. An example chat completion must have at least oneuser message.Assistant messages show example or historical completions, and must contain a responseto the preceding user message. Assistant messages aren't required, but if you include oneit must be paired with a user message to form an example.Work with promptsAn instruction is text that tells the model how to respond. An instruction can be a directive oran imperative:Directives tell the model how to behave, but aren't simple commands—think charactersetup for an improv actor: "You're helping students learn about U.S. history, so talkabout the U.S. unless they specifically ask about other countries."Imperatives are unambiguous commands for the model to follow. "Translate to Tagalog:"Directives are more open-ended and flexible than imperatives:You can combine several directives in one instruction.Instructions usually work better when you use them with examples. However, becauseimperatives are unambiguous commands, models don't need examples to understandthem (though you might use an example to show the model how to format responses).Because a directive doesn't tell the model exactly what to do, each example can help themodel work better.It's usually better to break down a difficult instruction into a series of steps, which you cando with a sequence of directives. You should also tell the model to output the result ofeach step, so that you can easily make granular adjustments. Although you can breakdown the instruction into steps yourself, it's easier to just tell the model to do it, and tooutput the result of each step. This approach is called chain of thought prompting.You can provide content to add more context to instructions.Primary content is text that you want the model to process with an instruction. Whatever actionthe instruction entails, the model will perform it on the primary content to produce acompletion.Supporting content is text that you refer to in an instruction, but which isn't the target of theinstruction. The model uses the supporting content to complete the instruction, which meansthat supporting content also appears in completions, typically as some kind of structure (suchas in headings or column labels).Use labels with your instructional content to help the model figure out how to use it with theinstruction. Don't worry too much about precision—labels don't have to match instructionsexactly because the model will handle things like word form and capitalization.Suppose you use the instruction "Summarize US Presidential accomplishments" to produce alist. The model might organize and order it in any number of ways. But what if you want the listUse instructions to improve the completionPrimary and supporting content add contextto group the accomplishments by a specific set of categories? Use supporting content to addthat information to the instruction.Adjust your instruction so the model groups by category, and append supporting content thatspecifies those categories:C#An example is text that shows the model how to respond by providing sample user input andmodel output. The model uses examples to infer what to include in completions. Examples cancome either before or after the instructions in an engineered prompt, but the two shouldn't beinterspersed.An example starts with a prompt and can optionally include a completion. A completion in anexample doesn't have to include the verbatim response—it might just contain a formattedword, the first bullet in an unordered list, or something similar to indicate how each completionshould start.Examples are classified as zero-shot learning or few-shot learning based on whether theycontain verbatim completions.Zero-shot learning examples include a prompt with no verbatim completion. Thisapproach tests a model's responses without giving it example data output. Zero-shotprompts can have completions that include cues, such as indicating the model shouldoutput an ordered list by including "1." as the completion.Few-shot learning examples include several pairs of prompts with verbatim completions.Few-shot learning can change the model's behavior by adding to its existing knowledge.prompt = """Instructions: Summarize US Presidential accomplishments, grouped by category.Categories: Domestic Policy, US Economy, Foreign Affairs, Space Exploration.Accomplishments: 'George Washington- First president of the United States.- First president to have been a military veteran.- First president to be elected to a second term in office.- Received votes from every presidential elector in an election.- Filled the entire body of the United States federal judges; including the Supreme Court.- First president to be declared an honorary citizen of a foreign country, and an honorary citizen of France.John Adams ...' ///Text truncated""";Use examples to guide the modelA cue is text that conveys the desired structure or format of output. Like an instruction, a cueisn't processed by the model as if it were user input. Like an example, a cue shows the modelwhat you want instead of telling it what to do. You can add as many cues as you want, so youcan iterate to get the result you want. Cues are used with an instruction or an example andshould be at the end of the prompt.Suppose you use an instruction to tell the model to produce a list of presidentialaccomplishments by category, along with supporting content that tells the model whatcategories to use. You decide that you want the model to produce a nested list with all caps forcategories, with each president's accomplishments in each category listed on one line thatbegins with their name, with presidents listed chronologically. After your instruction andsupporting content, you could add three cues to show the model how to structure and formatthe list:C#DOMESTIC POLICY shows the model that you want it to start each group with thecategory in all caps.- George Washington: shows the model to start each section with George Washington'saccomplishments listed on one line.- John Adams: shows the model that it should list remaining presidents in chronologicalorder.Understand cuesprompt = """Instructions: Summarize US Presidential accomplishments, grouped by category.Categories: Domestic Policy, US Economy, Foreign Affairs, Space Exploration.Accomplishments: George WashingtonFirst president of the United States.First president to have been a military veteran.First president to be elected to a second term in office.First president to receive votes from every presidential elector in an election.First president to fill the entire body of the United States federal judges; including the Supreme Court.First president to be declared an honorary citizen of a foreign country, and an honorary citizen of France.John Adams ... /// Text truncatedDOMESTIC POLICY- George Washington: - John Adams:""";Example prompt using .NET.NET provides various tools to prompt and chat with different AI models. Use Semantic Kernelto connect to a wide variety of AI models and services, as well as other SDKs such as the officialOpenAI .NET library. Semantic Kernel includes tools to create prompts with different rolesand maintain chat history, as well as many other features.Consider the following code example:C#The preceding code provides examples of the following concepts:Creates a chat history service to prompt the AI model for completions based on authorroles.Configures the AI with an AuthorRole.System message.using Microsoft.SemanticKernel;using Microsoft.SemanticKernel.ChatCompletion;// Create a kernel with OpenAI chat completion#pragma warning disable SKEXP0010Kernel kernel = Kernel.CreateBuilder() .AddOpenAIChatCompletion( modelId: "phi3:mini", endpoint: new Uri("http://localhost:11434"), apiKey: "") .Build();var aiChatService = kernel.GetRequiredService();var chatHistory = new ChatHistory();chatHistory.Add( new ChatMessageContent(AuthorRole.System, "You are a helpful AI Assistant."));while (true){ // Get user prompt and add to chat history Console.WriteLine("Your prompt:"); chatHistory.Add(new ChatMessageContent(AuthorRole.User, Console.ReadLine())); // Stream the AI response and add to chat history Console.WriteLine("AI Response:"); var response = ""; await foreach (var item in aiChatService.GetStreamingChatMessageContentsAsync(chatHistory)) { Console.Write(item.Content); response += item.Content; } chatHistory.Add(new ChatMessageContent(AuthorRole.Assistant, response)); Console.WriteLine();}Accepts user input to allow for different types of prompts in the context of anAuthorRole.User.Asynchronously streams the completion from the AI to provide a dynamic chatexperience.You can also increase the power of your prompts with more advanced prompt engineeringtechniques that are covered in depth in their own articles.LLMs have token input limits that constrain the amount of text you can fit in a prompt.Use embeddings and vector database solutions to reduce the number of tokens you needto represent a given piece of text.LLMs aren't trained on your data unless you train them yourself, which can be costly andtime-consuming. Use retrieval augmented generation (RAG) to make your data availableto an LLM without training it.Prompt engineering techniquesConfigure prompts in Semantic KernelExtend your prompt engineering techniquesRelated contentChain of thought prompting05/29/2025GPT model performance and response quality benefits from prompt engineering, which is thepractice of providing instructions and examples to a model to prime or refine its output. Asthey process instructions, models make more reasoning errors when they try to answer rightaway rather than taking time to work out an answer. You can help the model reason its waytoward correct answers more reliably by asking for the model to include its chain of thought—that is, the steps it took to follow an instruction, along with the results of each step.Chain of thought prompting is the practice of prompting a model to perform a task step-by-step and to present each step and its result in order in the output. This simplifies promptengineering by offloading some execution planning to the model, and makes it easier toconnect any problem to a specific step so you know where to focus further efforts.It's generally simpler to just instruct the model to include its chain of thought, but you can useexamples to show the model how to break down tasks. The following sections show both ways.To use an instruction for chain of thought prompting, include a directive that tells the model toperform the task step-by-step and to output the result of each step.C#You can use examples to indicate the steps for chain of thought prompting, which the modelwill interpret to mean it should also output step results. Steps can include formatting cues.C#Use chain of thought prompting in instructionsprompt= """Instructions: Compare the pros and cons of EVs and petroleum-fueled vehicles.Break the task into steps, and output the result of each step as you perform it."""; Use chain of thought prompting in examplesprompt= """ Instructions: Compare the pros and cons of EVs and petroleum-fueled vehicles. Differences between EVs and petroleum-fueled vehicles: - Prompt engineering techniques Differences ordered according to overall impact, highest-impact first: 1. Summary of vehicle type differences as pros and cons: Pros of EVs 1. Pros of petroleum-fueled vehicles 1. """;Related contentZero-shot and few-shot learning05/29/2025This article explains zero-shot learning and few-shot learning for prompt engineering in .NET,including their primary use cases.GPT model performance benefits from prompt engineering, the practice of providinginstructions and examples to a model to refine its output. Zero-shot learning and few-shotlearning are techniques you can use when providing examples.Zero-shot learning is the practice of passing prompts that aren't paired with verbatimcompletions, although you can include completions that consist of cues. Zero-shot learningrelies entirely on the model's existing knowledge to generate responses, which reduces thenumber of tokens created and can help you control costs. However, zero-shot learning doesn'tadd to the model's knowledge or context.Here's an example zero-shot prompt that tells the model to evaluate user input to determinewhich of four possible intents the input represents, and then to preface the response with"Intent: ".C#There are two primary use cases for zero-shot learning:Work with fined-tuned LLMs - Because it relies on the model's existing knowledge, zero-shot learning is not as resource-intensive as few-shot learning, and it works well withLLMs that have already been fined-tuned on instruction datasets. You might be able torely solely on zero-shot learning and keep costs relatively low.Establish performance baselines - Zero-shot learning can help you simulate how yourapp would perform for actual users. This lets you evaluate various aspects of your model'scurrent performance, such as accuracy or precision. In this case, you typically use zero-shot learning to establish a performance baseline and then experiment with few-shotlearning to improve performance.Zero-shot learningprompt = $"""Instructions: What is the intent of this request?If you don't know the intent, don't guess; instead respond with "Unknown".Choices: SendEmail, SendMessage, CompleteTask, CreateDocument, Unknown.User Input: {request}Intent: """;Few-shot learning is the practice of passing prompts paired with verbatim completions (few-shot prompts) to show your model how to respond. Compared to zero-shot learning, thismeans few-shot learning produces more tokens and causes the model to update itsknowledge, which can make few-shot learning more resource-intensive. However, few-shotlearning also helps the model produce more relevant responses.C#Few-shot learning has two primary use cases:Tuning an LLM - Because it can add to the model's knowledge, few-shot learning canimprove a model's performance. It also causes the model to create more tokens thanzero-shot learning does, which can eventually become prohibitively expensive or eveninfeasible. However, if your LLM isn't fined-tuned yet, you won't always get goodperformance with zero-shot prompts, and few-shot learning is warranted.Fixing performance issues - You can use few-shot learning as a follow-up to zero-shotlearning. In this case, you use zero-shot learning to establish a performance baseline, andthen experiment with few-shot learning based on the zero-shot prompts you used. Thislets you add to the model's knowledge after seeing how it currently responds, so you caniterate and improve performance while minimizing the number of tokens you introduce.Example-based learning doesn't work well for complex reasoning tasks. However, addinginstructions can help address this.Few-shot learning requires creating lengthy prompts. Prompts with large number oftokens can increase computation and latency. This typically means increased costs.Few-shot learningprompt = $"""Instructions: What is the intent of this request?If you don't know the intent, don't guess; instead respond with "Unknown".Choices: SendEmail, SendMessage, CompleteTask, CreateDocument, Unknown.User Input: Can you send a very quick approval to the marketing team?Intent: SendMessageUser Input: Can you send the full update to the marketing team?Intent: SendEmailUser Input: {request}Intent:""";CaveatsThere's also a limit to the length of the prompts.When you use several examples the model can learn false patterns, such as "Sentimentsare twice as likely to be positive than negative."Prompt engineering techniquesHow GenAI and LLMs workRelated contentRetrieval-augmented generation (RAG)provides LLM knowledge05/29/2025This article describes how retrieval-augmented generation lets LLMs treat your data sources asknowledge without having to train.LLMs have extensive knowledge bases through training. For most scenarios, you can select anLLM that is designed for your requirements, but those LLMs still require additional training tounderstand your specific data. Retrieval-augmented generation lets you make your dataavailable to LLMs without training them on it first.To perform retrieval-augmented generation, you create embeddings for your data along withcommon questions about it. You can do this on the fly or you can create and store theembeddings by using a vector database solution.When a user asks a question, the LLM uses your embeddings to compare the user's question toyour data and find the most relevant context. This context and the user's question then go tothe LLM in a prompt, and the LLM provides a response based on your data.To perform RAG, you must process each data source that you want to use for retrievals. Thebasic process is as follows:1. Chunk large data into manageable pieces.2. Convert the chunks into a searchable format.3. Store the converted data in a location that allows efficient access. Additionally, it'simportant to store relevant metadata for citations or references when the LLM providesresponses.4. Feed your converted data to LLMs in prompts.How RAG worksBasic RAG processSource data: This is where your data exists. It could be a file/folder on your machine, a filein cloud storage, an Azure Machine Learning data asset, a Git repository, or an SQLdatabase.Data chunking: The data in your source needs to be converted to plain text. For example,word documents or PDFs need to be cracked open and converted to text. The text is thenchunked into smaller pieces.Converting the text to vectors: These are embeddings. Vectors are numericalrepresentations of concepts converted to number sequences, which make it easy forcomputers to understand the relationships between those concepts.Links between source data and embeddings: This information is stored as metadata onthe chunks you created, which are then used to help the LLMs generate citations whilegenerating responses.Prompt engineeringRelated contentUnderstand OpenAI function calling05/29/2025Function calling is an OpenAI model feature that lets you describe functions and theirarguments in prompts using JSON. Instead of invoking the function itself, the model returns aJSON output describing what functions should be called and the arguments to use.Function calling simplifies how you connect external tools to your AI model. First, you specifyeach tool's functions to the model. Then the model decides which functions should be called,based on the prompt question. The model uses the function call results to build a moreaccurate and consistent response.Potential use cases for function calling include:Answering questions by calling external APIs, for example, sending emails or getting theweather forecast.Answering questions with info from an internal datastore, for example, aggregating salesdata to answer, "What are my best-selling products?".Creating structured data from text info, for example, building a user info object withdetails from the chat history.The general steps for calling functions with an OpenAI model are:1. Send the user's question as a request with functions defined in the tools parameters.2. The model decides which functions, if any, to call. The output contains a JSON object thatlists the function calls and their arguments.3. Parse the output and call the requested functions with their specified arguments.4. Send another request with the function results included as a new message.5. The model responds with more function call requests or an answer to the user's question.Continue invoking the requested function calls until the model responds with ananswer.You can force the model to request a specific function by setting the tool_choice parameter tothe function's name. You can also force the model to respond with a message for the user byCall functions with OpenAI7 NoteThe model might hallucinate additional arguments.setting the tool_choice parameter to "none".Some models support parallel function calling, which enables the model to request multiplefunction calls in one output. The results of each function call are included together in oneresponse back to the model. Parallel function calling reduces the number of API requests andtime needed to generate an answer. Each function result is included as a new message in theconversation with a tool_call_id matching the id of the function call request.Not all OpenAI models are trained to support function calling. For a list of models that supportfunction calling or parallel function calling, see OpenAI - Supported Models.The Semantic Kernel SDK supports describing which functions are available to your AI using theKernelFunction decorator.The Kernel builds the tools parameter of a request based on your decorators, orchestrates therequested function calls to your code, and returns results back to the model.Function descriptions are include in the system message of your request to a model. Thesefunction descriptions count against your model's token limit and are included in the cost of therequest.If your request exceeds the model's token limit, try the following modifications:Reduce the number of functions.Shorten the function and argument descriptions in your JSON.Understanding tokensCreating native functions for AI to callPrompt engineeringCall functions in parallelSupported modelsFunction calling with the Semantic Kernel SDKToken countsRelated contentGet started with the 'Chat using your owndata sample' for .NET05/28/2025This article shows you how to deploy and run the Chat with your own data sample for .NET.This sample implements a chat app using C#, Azure OpenAI Service, and Retrieval AugmentedGeneration (RAG) in Azure AI Search to get answers about employee benefits at a fictitiouscompany. The employee benefits chat app is seeded with PDF files including an employeehandbook, a benefits document and a list of company roles and expectations.Demo videoBy following the instructions in this article, you will:Deploy a chat app to Azure.Get answers about employee benefits.Change settings to change behavior of responses.Once you complete this procedure, you can start modifying the new project with your customcode.This article is part of a collection of articles that show you how to build a chat app using AzureOpen AI Service and Azure AI Search.Other articles in the collection include:PythonJavaScriptJavaIn this sample application, a fictitious company called Contoso Electronics provides the chatapp experience to its employees to ask questions about the benefits, internal policies, and jobdescriptions and roles.The architecture of the chat app is shown in the following diagram:Architectural overviewUser interface - The application's chat interface is a Blazor WebAssembly application. Thisinterface is what accepts user queries, routes request to the application backend, anddisplays generated responses.Backend - The application backend is an ASP.NET Core Minimal API. The backend hoststhe Blazor static web application and is what orchestrates the interactions among thedifferent services. Services used in this application include:Azure Cognitive Search – Indexes documents from the data stored in an Azure StorageAccount. This makes the documents searchable using vector search capabilities.Azure OpenAI Service – Provides the Large Language Models (LLM) to generateresponses. Semantic Kernel is used in conjunction with the Azure OpenAI Service toorchestrate the more complex AI workflows.Most resources in this architecture use a basic or consumption pricing tier. Consumptionpricing is based on usage, which means you only pay for what you use. To complete this article,there will be a charge, but it will be minimal. When you are done with the article, you candelete the resources to stop incurring charges.For more information, see Azure Samples: Cost in the sample repo.A development container environment is available with all dependencies required tocomplete this article. You can run the development container in GitHub Codespaces (in aCostPrerequisitesbrowser) or locally using Visual Studio Code.To follow along with this article, you need the following prerequisites:An Azure subscription - Create one for freeAzure account permissions - Your Azure account must haveMicrosoft.Authorization/roleAssignments/write permissions, such as User AccessAdministrator or Owner.GitHub accountBegin now with a development environment that has all the dependencies installed tocomplete this article.GitHub Codespaces runs a development container managed by GitHub with VisualStudio Code for the Web as the user interface. For the most straightforwarddevelopment environment, use GitHub Codespaces so that you have the correct developertools and dependencies preinstalled to complete this article.1. Start the process to create a new GitHub codespace on the main branch of theAzure-Samples/azure-search-openai-demo-csharp GitHub repository.2. To have both the development environment and the documentation available at thesame time, right-click on the following Open in GitHub Codespaces button, andselect Open link in new windows.Codespaces (recommended)Open development environmentGitHub Codespaces (recommended)) ImportantAll GitHub accounts can use Codespaces for up to 60 hours free each month with 2core instances. For more information, see GitHub Codespaces monthly includedstorage and core hours.3. On the Create codespace page, review the codespace configuration settings andthen select Create new codespace:4. Wait for the codespace to start. This startup process can take a few minutes.5. In the terminal at the bottom of the screen, sign in to Azure with the AzureDeveloper CLI.Bash6. Copy the code from the terminal and then paste it into a browser. Follow theinstructions to authenticate with your Azure account.7. The remaining tasks in this article take place in the context of this developmentcontainer.The sample repository contains all the code and configuration files you need to deploy a chatapp to Azure. The following steps walk you through the process of deploying the sample toAzure.azd auth loginDeploy and run1. Run the following Azure Developer CLI command to provision the Azure resources anddeploy the source code:Bash2. When you're prompted to enter an environment name, keep it short and lowercase. Forexample, myenv. Its used as part of the resource group name.3. When prompted, select a subscription to create the resources in.4. When you're prompted to select a location the first time, select a location near you. Thislocation is used for most the resources including hosting.5. If you're prompted for a location for the OpenAI model, select a location that is near you.If the same location is available as your first location, select that.6. Wait until app is deployed. It may take up to 20 minutes for the deployment to complete.7. After the application has been successfully deployed, you see a URL displayed in theterminal.8. Select that URL labeled Deploying service web to open the chat application in a browser.Deploy chat app to Azure) ImportantAzure resources created in this section incur immediate costs, primarily from the Azure AISearch resource. These resources may accrue costs even if you interrupt the commandbefore it is fully executed.azd upThe chat app is preloaded with employee benefits information from PDF files. You can usethe chat app to ask questions about the benefits. The following steps walk you through theprocess of using the chat app.1. In the browser, navigate to the Chat page using the left navigation.2. Select or enter "What is included in my Northwind Health Plus plan that is not instandard?" in the chat text box. Your response is similar to the following image.Use chat app to get answers from PDF files3. From the answer, select a citation. A pop-up window will open displaying the source ofthe information.4. Navigate between the tabs at the top of the answer box to understand how the answerwas generated.TabDescriptionThoughtprocessThis is a script of the interactions in chat. You can view the system prompt(content) and your user question (content).SupportingcontentThis includes the information to answer your question and the source material.The number of source material citations is noted in the Developer settings. Thedefault value is 3.CitationThis displays the source page that contains the citation.5. When you're done, navigate back to the answer tab.The intelligence of the chat is determined by the OpenAI model and the settings that are usedto interact with the model.ノExpand tableUse chat app settings to change behavior of responsesノExpand tableSettingDescriptionOverride prompttemplateThis is the prompt that is used to generate the answer.Retrieve this manysearch resultsThis is the number of search results that are used to generate the answer. Youcan see these sources returned in the Thought process and Supporting contenttabs of the citation.Exclude categoryThis is the category of documents that are excluded from the search results.Use semantic rankerfor retrievalThis is a feature of Azure AI Search that uses machine learning to improve therelevance of search results.Retrieval modeVectors + Text means that the search results are based on the text of thedocuments and the embeddings of the documents. Vectors means that thesearch results are based on the embeddings of the documents. Text means thatthe search results are based on the text of the documents.Use query-contextualsummaries instead ofwhole documentsWhen both Use semantic ranker and Use query-contextual summaries arechecked, the LLM uses captions extracted from key passages, instead of all thepassages, in the highest ranked documents.Suggest follow-upquestionsHave the chat app suggest follow-up questions based on the answer.The following steps walk you through the process of changing the settings.1. In the browser, select the gear icon in the upper right of the page.2. If not selected, select the Suggest follow-up questions checkbox and ask the samequestion again.TextThe chat might return with follow-up question suggestions.3. In the Settings tab, deselect Use semantic ranker for retrieval.4. Ask the same question again.Text5. What is the difference in the answers?What is included in my Northwind Health Plus plan that is not in standard?What is my deductible?The response that used the Semantic ranker provided a single answer. The responsewithout semantic ranking returned a less direct answer.To finish, clean up the Azure and GitHub CodeSpaces resources you used.The Azure resources created in this article are billed to your Azure subscription. If you don'texpect to need these resources in the future, delete them to avoid incurring more charges.Run the following Azure Developer CLI command to delete the Azure resources and removethe source code:BashDeleting the GitHub Codespaces environment ensures that you can maximize the amountof free per-core hours entitlement you get for your account.1. Sign into the GitHub Codespaces dashboard (https://github.com/codespaces).2. Locate your currently running codespaces sourced from the Azure-Samples/azure-search-openai-demo-csharp GitHub repository.Clean up resourcesClean up Azure resourcesazd down --purgeClean up GitHub CodespacesGitHub Codespaces) ImportantFor more information about your GitHub account's entitlements, see GitHubCodespaces monthly included storage and core hours.3. Open the context menu for the codespace and then select Delete.This sample repository offers troubleshooting information.If your issue isn't addressed, log your issue to the repository's Issues.Get helpNext stepsGet the source code for the sample used in this articleBuild a chat app with Azure OpenAI best practice solution architectureAccess control in Generative AI Apps with Azure AI SearchBuild an Enterprise ready OpenAI solution with Azure API ManagementOutperforming vector search with hybrid retrieval and ranking capabilitiesImplement Azure OpenAI with RAGusing vector search in a .NET appArticle•11/24/2024This tutorial explores integration of the RAG pattern using Open AI models and vectorsearch capabilities in a .NET app. The sample application performs vector searches oncustom data stored in Azure Cosmos DB for MongoDB and further refines the responsesusing generative AI models, such as GPT-35 and GPT-4. In the sections that follow, you'llset up a sample application and explore key code examples that demonstrate theseconcepts..NET 8.0 installedAn Azure AccountAn Azure Cosmos DB for MongoDB vCore serviceAn Azure Open AI serviceDeploy text-embedding-ada-002 model for embeddingsDeploy gpt-35-turbo model for chat completionsThe Cosmos Recipe Guide app allows you to perform vector and AI driven searchesagainst a set of recipe data. You can search directly for available recipes or prompt theapp with ingredient names to find related recipes. The app and the sections ahead guideyou through the following workflow to demonstrate this type of functionality:1. Upload sample data to an Azure Cosmos DB for MongoDB database.2. Create embeddings and a vector index for the uploaded sample data using theAzure OpenAI text-embedding-ada-002 model.3. Perform vector similarity search based on the user prompts.4. Use the Azure OpenAI gpt-35-turbo completions model to compose moremeaningful answers based on the search results data.PrerequisitesApp overview1. Clone the following GitHub repository:Bash2. In the C#/CosmosDB-MongoDBvCore folder, open the CosmosRecipeGuide.sln file.3. In the appsettings.json file, replace the following config values with your AzureOpenAI and Azure CosmosDB for MongoDb values:JSON4. Launch the app by pressing the Start button at the top of Visual Studio.When you run the app for the first time, it connects to Azure Cosmos DB and reportsthat there are no recipes available yet. Follow the steps displayed by the app to beginGet startedgit clone https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples.git"OpenAIEndpoint": "https://.openai.azure.com/","OpenAIKey": "","OpenAIEmbeddingDeployment": "","OpenAIcompletionsDeployment": "","MongoVcoreConnection": ""Explore the appthe core workflow.1. Select Upload recipe(s) to Cosmos DB and press Enter. This command readssample JSON files from the local project and uploads them to the Cosmos DBaccount.The code from the Utility.cs class parses the local JSON files.C#The UpsertVectorAsync method in the VCoreMongoService.cs file uploads thedocuments to Azure Cosmos DB for MongoDB.C#public static List ParseDocuments(string Folderpath){ List recipes = new List(); Directory.GetFiles(Folderpath) .ToList() .ForEach(f => { var jsonString= System.IO.File.ReadAllText(f); Recipe recipe = JsonConvert.DeserializeObject(jsonString); recipe.id = recipe.name.ToLower().Replace(" ", ""); ret.Add(recipe); } ); return recipes;}public async Task UpsertVectorAsync(Recipe recipe) { BsonDocument document = recipe.ToBsonDocument(); if (!document.Contains("_id")) { Console.WriteLine("UpsertVectorAsync: Document does not contain _id."); throw new ArgumentException("UpsertVectorAsync: Document does not contain _id."); } string? _idValue = document["_id"].ToString(); try { var filter = Builders.Filter.Eq("_id", 2. Select Vectorize the recipe(s) and store them in Cosmos DB.The JSON items uploaded to Cosmos DB do not contain embeddings andtherefore are not optimized for RAG via vector search. An embedding is aninformation-dense, numerical representation of the semantic meaning of a pieceof text. Vector searches are able to find items with contextually similarembeddings.The GetEmbeddingsAsync method in the OpenAIService.cs file creates an embeddingfor each item in the database.C#_idValue); var options = new ReplaceOptions { IsUpsert = true }; await _recipeCollection.ReplaceOneAsync(filter, document, options); } catch (Exception ex) { Console.WriteLine($"Exception: UpsertVectorAsync(): {ex.Message}"); throw; } }public async Task GetEmbeddingsAsync(dynamic data){ try { EmbeddingsOptions options = new EmbeddingsOptions(data) { Input = data }; var response = await _openAIClient.GetEmbeddingsAsync(openAIEmbeddingDeployment, options); Embeddings embeddings = response.Value; float[] embedding = embeddings.Data[0].Embedding.ToArray(); return embedding; } catch (Exception ex) { Console.WriteLine($"GetEmbeddingsAsync Exception: {ex.Message}"); return null; }}The CreateVectorIndexIfNotExists in the VCoreMongoService.cs file creates avector index, which enables you to perform vector similarity searches.C#3. Select the Ask AI Assistant (search for a recipe by name or description, or ask aquestion) option in the application to run a user query.public void CreateVectorIndexIfNotExists(string vectorIndexName){ try { //Find if vector index exists in vectors collection using (IAsyncCursor indexCursor = _recipeCollection.Indexes.List()) { bool vectorIndexExists = indexCursor.ToList().Any(x => x["name"] == vectorIndexName); if (!vectorIndexExists) { BsonDocumentCommand command = new BsonDocumentCommand( BsonDocument.Parse(@" { createIndexes: 'Recipe', indexes: [{ name: 'vectorSearchIndex', key: { embedding: 'cosmosSearch' }, cosmosSearchOptions: { kind: 'vector-ivf', numLists: 5, similarity: 'COS', dimensions: 1536 } }] }")); BsonDocument result = _database.RunCommand(command); if (result["ok"] != 1) { Console.WriteLine("CreateIndex failed with response: " + result.ToJson()); } } } } catch (MongoException ex) { Console.WriteLine("MongoDbService InitializeVectorIndex: " + ex.Message); throw; }}The user query is converted to an embedding using the Open AI service and theembedding model. The embedding is then sent to Azure Cosmos DB for MongoDBand is used to perform a vector search. The VectorSearchAsync method in theVCoreMongoService.cs file performs a vector search to find vectors that are close tothe supplied vector and returns a list of documents from Azure Cosmos DB forMongoDB vCore.C#public async Task> VectorSearchAsync(float[] queryVector) { List retDocs = new List(); string resultDocuments = string.Empty; try { //Search Azure Cosmos DB for MongoDB vCore collection for similar embeddings //Project the fields that are needed BsonDocument[] pipeline = new BsonDocument[] { BsonDocument.Parse( @$"{{$search: {{ cosmosSearch: {{ vector: [{string.Join(',', queryVector)}], path: 'embedding', k: {_maxVectorSearchResults}}}, returnStoredSource:true }} }}"), BsonDocument.Parse($"{{$project: {{embedding: 0}}}}"), }; var bsonDocuments = await _recipeCollection .Aggregate(pipeline).ToListAsync(); var recipes = bsonDocuments .ToList() .ConvertAll(bsonDocument => BsonSerializer.Deserialize(bsonDocument)); return recipes; } catch (MongoException ex) { Console.WriteLine($"Exception: VectorSearchAsync(): {ex.Message}"); throw; } }The GetChatCompletionAsync method generates an improved chat completionresponse based on the user prompt and the related vector search results.C#public async Task<(string response, int promptTokens, int responseTokens)> GetChatCompletionAsync(string userPrompt, string documents){ try { ChatMessage systemMessage = new ChatMessage( ChatRole.System, _systemPromptRecipeAssistant + documents); ChatMessage userMessage = new ChatMessage( ChatRole.User, userPrompt); ChatCompletionsOptions options = new() { Messages = { systemMessage, userMessage }, MaxTokens = openAIMaxTokens, Temperature = 0.5f, //0.3f, NucleusSamplingFactor = 0.95f, FrequencyPenalty = 0, PresencePenalty = 0 }; Azure.Response completionsResponse = await openAIClient.GetChatCompletionsAsync(openAICompletionDeployment, options); ChatCompletions completions = completionsResponse.Value; return ( response: completions.Choices[0].Message.Content, promptTokens: completions.Usage.PromptTokens, responseTokens: completions.Usage.CompletionTokens ); } catch (Exception ex) { string message = $"OpenAIService.GetChatCompletionAsync(): {ex.Message}"; Console.WriteLine(message); throw; }}The app also uses prompt engineering to ensure Open AI service limits andformats the response for supplied recipes.C#//System prompts to send with user prompts to instruct the model for chat sessionprivate readonly string _systemPromptRecipeAssistant = @" You are an intelligent assistant for Contoso Recipes. You are designed to provide helpful answers to user questions about recipes, cooking instructions provided in JSON format below. Instructions: - Only answer questions related to the recipe provided below. - Don't reference any recipe not provided below. - If you're unsure of an answer, say ""I don't know"" and recommend users search themselves. - Your response should be complete. - List the Name of the Recipe at the start of your response followed by step by step cooking instructions. - Assume the user is not an expert in cooking. - Format the content so that it can be printed to the Command Line console. - In case there is more than one recipe you find, let the user pick the most appropriate recipe.";Scale Azure OpenAI for .NET chat usingRAG with Azure Container Apps05/29/2025Learn how to add load balancing to your application to extend the chat app beyond the AzureOpenAI Service token and model quota limits. This approach uses Azure Container Apps tocreate three Azure OpenAI endpoints and a primary container to direct incoming traffic to oneof the three endpoints.This article requires you to deploy two separate samples:Chat appIf you haven't deployed the chat app yet, wait until after the load balancer sample isdeployed.If you already deployed the chat app once, change the environment variable tosupport a custom endpoint for the load balancer and redeploy it again.The chat app is available in these languages:.NETJavaScriptPythonLoad balancer appBecause the Azure OpenAI resource has specific token and model quota limits, a chat app thatuses a single Azure OpenAI resource is prone to have conversation failures because of thoselimits.7 NoteThis article uses one or more AI app templates as the basis for the examples andguidance in the article. AI app templates provide you with well-maintained referenceimplementations that are easy to deploy. They help to ensure a high-quality starting pointfor your AI apps.Architecture for load balancing Azure OpenAI withAzure Container AppsTo use the chat app without hitting those limits, use a load-balanced solution with ContainerApps. This solution seamlessly exposes a single endpoint from Container Apps to your chatapp server.The container app sits in front of a set of Azure OpenAI resources. The container app solvestwo scenarios: normal and throttled. During a normal scenario where token and model quota isavailable, the Azure OpenAI resource returns a 200 back through the container app and appserver.When a resource is in a throttled scenario because of quota limits, the container app can retry adifferent Azure OpenAI resource immediately to fulfill the original chat app request.Azure subscription. Create one for free.Dev containers are available for both samples, with all dependencies required to completethis article. You can run the dev containers in GitHub Codespaces (in a browser) or locally usingPrerequisitesVisual Studio Code.Only a GitHub account is required to use CodeSpacesGitHub Codespaces runs a development container managed by GitHub with VisualStudio Code for the Web as the user interface. For the most straightforwarddevelopment environment, use GitHub Codespaces so that you have the correct developertools and dependencies preinstalled to complete this article.1. Sign in to the Azure Developer CLI to provide authentication to the provisioning anddeployment steps:Bash2. Set an environment variable to use Azure CLI authentication to the post provision step:BashCodespaces (recommended)Open the Container Apps load balancer sampleappGitHub Codespaces (recommended)) ImportantAll GitHub accounts can use GitHub Codespaces for up to 60 hours free each monthwith two core instances. For more information, see GitHub Codespaces monthlyincluded storage and core hours.Deploy the Azure Container Apps load balancerazd auth login --use-device-code3. Deploy the load balancer app:BashSelect a subscription and region for the deployment. They don't have to be the samesubscription and region as the chat app.4. Wait for the deployment to finish before you continue.1. Use the following command to display the deployed endpoint for the container app:Bash2. Copy the CONTAINER_APP_URL value. You use it in the next section.These examples are completed on the chat app sample.1. Open the chat app sample's dev container by using one of the following choices.LanguageGitHub CodespacesVisual Studio Code.NETDev ContainersDev ContainersOpenOpenJavaScriptDev ContainersDev ContainersOpenOpenazd config set auth.useAzCliAuth "true"azd upGet the deployment endpointazd env get-valuesRedeploy the chat app with the load balancerendpointInitial deploymentノExpand tableLanguageGitHub CodespacesVisual Studio CodePythonDev ContainersDev ContainersOpenOpen2. Sign in to the Azure Developer CLI (AZD):BashFinish the sign-in instructions.3. Create an AZD environment with a name such as chat-app:Bash4. Add the following environment variable, which tells the chat app's backend to use acustom URL for the Azure OpenAI requests:Bash5. Add the following environment variable. Substitute for the URLfrom the previous section. This action tells the chat app's backend what the value isof the custom URL for the Azure OpenAI request.Bash6. Deploy the chat app:BashYou can now use the chat app with the confidence that it's built to scale across many userswithout running out of quota.azd auth loginazd env new azd env set OPENAI_HOST azure_customazd env set AZURE_OPENAI_CUSTOM_URL azd up1. In the Azure portal, search your resource group.2. From the list of resources in the group, select the Azure Container Apps resource.3. Select Monitoring > Log stream to view the log.4. Use the chat app to generate traffic in the log.5. Look for the logs, which reference the Azure OpenAI resources. Each of the threeresources has its numeric identity in the log comment that begins with Proxying tohttps://openai3, where 3 indicates the third Azure OpenAI resource.When the load balancer receives status that the request exceeds quota, the load balancerautomatically rotates to another resource.By default, each of the Azure OpenAI instances in the load balancer is deployed with a capacityof 30,000 tokens per minute (TPM). You can use the chat app with the confidence that it's builtto scale across many users without running out of quota. Change this value when:Stream logs to see the load balancer resultsConfigure the TPM quotaYou get deployment capacity errors: Lower the value.You need higher capacity: Raise the value.1. Use the following command to change the value:Bash2. Redeploy the load balancer:BashWhen you're finished with the chat app and the load balancer, clean up the resources. TheAzure resources created in this article are billed to your Azure subscription. If you don't expectto need these resources in the future, delete them to avoid incurring more charges.Return to the chat app article to clean up the resources:.NETJavaScriptPythonRun the following Azure Developer CLI command to delete the Azure resources and removethe source code:BashThe switches provide:purge: Deleted resources are immediately purged so that you can reuse the AzureOpenAI Service tokens per minute.azd env set OPENAI_CAPACITY 50azd upClean up resourcesClean up chat app resourcesClean upload balancer resourcesazd down --purge --forceforce: The deletion happens silently, without requiring user consent.Deleting the GitHub Codespaces environment ensures that you can maximize the amountof free per-core hours entitlement that you get for your account.1. Sign in to the GitHub Codespaces dashboard.2. Locate your currently running codespaces that are sourced from the azure-samples/openai-aca-lb GitHub repository.3. Open the context menu for the codespace, and then select Delete.Clean up GitHub Codespaces and Visual Studio CodeGitHub Codespaces) ImportantFor more information about your GitHub account's entitlements, see GitHubCodespaces monthly included storage and core hours.If you have trouble deploying the Azure API Management load balancer, add your issue to therepository's Issues webpage.Samples used in this article include:.NET chat app with RAGLoad Balancer with Azure Container AppsUse Azure Load Testing to load test your chat appGet helpSample codeNext stepAzure AI services authentication andauthorization using .NETArticle•04/09/2025Application requests to Azure AI Services must be authenticated. In this article, you explore theoptions available to authenticate to Azure OpenAI and other AI services using .NET. Theseconcepts apply to the Semantic Kernel SDK, as well as SDKs from specific services such asAzure OpenAI. Most AI services offer two primary ways to authenticate apps and users:Key-based authentication provides access to an Azure service using secret key values.These secret values are sometimes known as API keys or access keys depending on theservice.Microsoft Entra ID provides a comprehensive identity and access management solutionto ensure that the correct identities have the correct level of access to different Azureresources.The sections ahead provide conceptual overviews for these two approaches, rather thandetailed implementation steps. For more detailed information about connecting to Azureservices, visit the following resources:Authenticate .NET apps to Azure servicesIdentity fundamentalsWhat is Azure RBAC?Access keys allow apps and tools to authenticate to an Azure AI service, such as Azure OpenAI,using a secret key provided by the service. Retrieve the secret key using tools such as the Azureportal or Azure CLI and use it to configure your app code to connect to the AI service:C#7 NoteThe examples in this article focus primarily on connections to Azure OpenAI, but the sameconcepts and implementation steps directly apply to many other Azure AI services as well.Authentication using keysbuilder.Services.AddAzureOpenAIChatCompletion( "deployment-model", "service-endpoint",Using keys is a straightforward option, but this approach should be used with caution. Keysaren't the recommended authentication option because they:Don't follow the principle of least privilege. They provide elevated permissions regardlessof who uses them or for what task.Can accidentally be checked into source control or stored in unsafe locations.Can easily be shared with or sent to parties who shouldn't have access.Often require manual administration and rotation.Instead, consider using Microsoft Entra ID for authentication, which is the recommendedsolution for most scenarios.Microsoft Entra ID is a cloud-based identity and access management service that provides avast set of features for different business and app scenarios. Microsoft Entra ID is therecommended solution to connect to Azure OpenAI and other AI services and provides thefollowing benefits:Keyless authentication using identities.Role-based access control (RBAC) to assign identities the minimum required permissions.Can use the Azure.Identity client library to detect different credentials acrossenvironments without requiring code changes.Automatically handles administrative maintenance tasks such as rotating underlying keys.The workflow to implement Microsoft Entra authentication in your app generally includes thefollowing steps:Local development:1. Sign-in to Azure using a local dev tool such as the Azure CLI or Visual Studio.2. Configure your code to use the Azure.Identity client library andDefaultAzureCredential class.3. Assign Azure roles to the account you signed-in with to enable access to the AIservice.Azure-hosted app:1. Deploy the app to Azure after configuring it to authenticate using theAzure.Identity client library. "service-key"); // Secret keyvar kernel = builder.Build();Authentication using Microsoft Entra ID2. Assign a managed identity to the Azure-hosted app.3. Assign Azure roles to the managed identity to enable access to the AI service.The key concepts of this workflow are explored in the following sections.When developing apps locally that connect to Azure AI services, authenticate to Azure using atool such as Visual Studio or the Azure CLI. Your local credentials can be discovered by theAzure.Identity client library and used to authenticate your app to Azure services, as describedin the Configure the app code section.For example, to authenticate to Azure locally using the Azure CLI, run the following command:Azure CLIUse the Azure.Identity client library from the Azure SDK to implement Microsoft Entraauthentication in your code. The Azure.Identity libraries include the DefaultAzureCredentialclass, which automatically discovers available Azure credentials based on the currentenvironment and tooling available. Visit the Azure SDK for .NET documentation for the full setof supported environment credentials and the order in which they are searched.For example, configure Semantic Kernel to authenticate using DefaultAzureCredential usingthe following code:C#DefaultAzureCredential enables apps to be promoted from local development to productionwithout code changes. For example, during development DefaultAzureCredential uses yourlocal user credentials from Visual Studio or the Azure CLI to authenticate to the AI service.Authenticate to Azure locallyaz loginConfigure the app codeKernel kernel = Kernel .CreateBuilder() .AddAzureOpenAITextGeneration( "your-model", "your-endpoint", new DefaultAzureCredential()) .Build();When the app is deployed to Azure, DefaultAzureCredential uses the managed identity that isassigned to your app.Azure role-based access control (Azure RBAC) is a system that provides fine-grained accessmanagement of Azure resources. Assign a role to the security principal used byDefaultAzureCredential to connect to an Azure AI service, whether that's an individual user,group, service principal, or managed identity. Azure roles are a collection of permissions thatallow the identity to perform various tasks, such as generate completions or create and deleteresources.Assign roles such as Cognitive Services OpenAI User (role ID: 5e0bd9bd-7b93-4f28-af87-19fc36ad61bd) to the relevant identity using tools such as the Azure CLI, Bicep, or the AzurePortal. For example, use the az role assignment create command to assign a role using theAzure CLI:Azure CLILearn more about Azure RBAC using the following resources:What is Azure RBAC?Grant a user accessRBAC best practicesIn most scenarios, Azure-hosted apps should use a managed identity to connect to otherservices such as Azure OpenAI. Managed identities provide a fully managed identity inMicrosoft Entra ID for apps to use when connecting to resources that support Microsoft Entraauthentication. DefaultAzureCredential discovers the identity associated with your app anduses it to authenticate to other Azure services.There are two types of managed identities you can assign to your app:Assign roles to your identityaz role assignment create \ --role "5e0bd9bd-7b93-4f28-af87-19fc36ad61bd" \ --assignee-object-id "$PRINCIPAL_ID" \ --scope /subscriptions/"$SUBSCRIPTION_ID"/resourceGroups/"$RESOURCE_GROUP" \ --assignee-principal-type UserAssign a managed identity to your appA system-assigned identity is tied to your application and is deleted if your app isdeleted. An app can only have one system-assigned identity.A user-assigned identity is a standalone Azure resource that can be assigned to your app.An app can have multiple user-assigned identities.Assign roles to a managed identity just like you would an individual user account, such as theCognitive Services OpenAI User role. learn more about working with managed identities usingthe following resources:Managed identities overviewAuthenticate App Service to Azure OpenAI using Microsoft Entra IDHow to use managed identities for App Service and Azure FunctionsAuthenticate to Azure OpenAI from anAzure hosted app using Microsoft Entra ID05/29/2025This article demonstrates how to use Microsoft Entra ID managed identities and theMicrosoft.Extensions.AI library to authenticate an Azure hosted app to an Azure OpenAIresource.A managed identity from Microsoft Entra ID allows your app to easily access other MicrosoftEntra protected resources such as Azure OpenAI. The identity is managed by the Azureplatform and doesn't require you to provision, manage, or rotate any secrets.An Azure account that has an active subscription. Create an account for free..NET SDKCreate and deploy an Azure OpenAI Service resourceCreate and deploy a .NET application to App ServiceManaged identities provide an automatically managed identity in Microsoft Entra ID forapplications to use when connecting to resources that support Microsoft Entra authentication.Applications can use managed identities to obtain Microsoft Entra tokens without having tomanage any credentials. Your application can be assigned two types of identities:A system-assigned identity is tied to your application and is deleted if your app isdeleted. An app can have only one system-assigned identity.A user-assigned identity is a standalone Azure resource that can be assigned to your app.An app can have multiple user-assigned identities.1. Navigate to your app's page in the Azure portal, and then scroll down to theSettings group.2. Select Identity.3. On the System assigned tab, toggle Status to On, and then select Save.PrerequisitesAdd a managed identity to App ServiceSystem-assigned1. In the Azure Portal, navigate to the scope that you want to grant Azure OpenAI accessto. The scope can be a Management group, Subscription, Resource group, or a specificAzure OpenAI resource.2. In the left navigation pane, select Access control (IAM).3. Select Add, then select Add role assignment.7 NoteThe preceding screenshot demonstrates this process on an Azure App Service,but the steps are similar on other hosts such as Azure Container Apps.Add an Azure OpenAI user role to the identity4. On the Role tab, select the Cognitive Services OpenAI User role.5. On the Members tab, select the managed identity.6. On the Review + assign tab, select Review + assign to assign the role.1. Add the following NuGet packages to your app:.NET CLIThe preceding packages each handle the following concerns for this scenario:Azure.Identity: Provides core functionality to work with Microsoft Entra IDAzure.AI.OpenAI: Enables your app to interface with the Azure OpenAI serviceImplement identity authentication in your appcodedotnet add package Azure.Identitydotnet add package Azure.AI.OpenAIdotnet add package Microsoft.Extensions.Azuredotnet add package Microsoft.Extensions.AIdotnet add package Microsoft.Extensions.AI.OpenAIMicrosoft.Extensions.Azure: Provides helper extensions to register services fordependency injectionMicrosoft.Extensions.AI: Provides AI abstractions for common AI tasksMicrosoft.Extensions.AI.OpenAI: Enables you to use OpenAI service types as AIabstractions provided by Microsoft.Extensions.AI2. In the Program.cs file of your app, create a DefaultAzureCredential object to discoverand configure available credentials:C#3. Create an AI service and register it with the service collection:C#4. Inject the registered service for use in your endpoints:C#// For example, will discover Visual Studio or Azure CLI credentials// in local environments and managed identity credentials in production deploymentsvar credential = new DefaultAzureCredential( new DefaultAzureCredentialOptions { // If necessary, specify the tenant ID, // user-assigned identity client or resource ID, or other options });string endpoint = builder.Configuration["AZURE_OPENAI_ENDPOINT"];string deployment = builder.Configuration["AZURE_OPENAI_GPT_NAME"];builder.Services.AddChatClient( new AzureOpenAIClient(new Uri(endpoint), credential) .GetChatClient(deployment) .AsIChatClient());app.MapGet("/test-prompt", async (IChatClient chatClient) =>{ return await chatClient.GetResponseAsync("Test prompt", new ChatOptions());}).WithName("Test prompt"); TipHow to use managed identities for App Service and Azure FunctionsRole-based access control for Azure OpenAI ServiceLearn more about ASP.NET Core dependency injection and how to register other AIservices types in the Azure SDK for .NET dependency injection documentation.Related contentAuthenticate .NET apps to Azureservices during local development usingdeveloper accountsArticle•03/20/2025During local development, applications need to authenticate to Azure to access variousAzure services. Two common approaches for local authentication are to use a serviceprincipal or to use a developer account. This article explains how to use a developeraccount. In the sections ahead, you learn:How to use Microsoft Entra groups to efficiently manage permissions for multipledeveloper accountsHow to assign roles to developer accounts to scope permissionsHow to sign-in to supported local development toolsHow to authenticate using a developer account from your app codeFor an app to authenticate to Azure during local development using the developer'sAzure credentials, the developer must be signed-in to Azure from one of the followingdeveloper tools:Azure CLIAzure Developer CLIAzure PowerShellVisual StudioThe Azure Identity library can detect that the developer is signed-in from one of thesetools. The library can then obtain the Microsoft Entra access token via the tool toauthenticate the app to Azure as the signed-in user.This approach takes advantage of the developer's existing Azure accounts to streamlinethe authentication process. However, a developer's account likely has more permissionsthan required by the app, therefore exceeding the permissions the app runs with inproduction. As an alternative, you can create application service principals to use duringlocal development, which can be scoped to have only the access needed by the app.Create a Microsoft Entra group to encapsulate the roles (permissions) the app needs inlocal development rather than assigning the roles to individual service principal objects.This approach offers the following advantages:Every developer has the same roles assigned at the group level.If a new role is needed for the app, it only needs to be added to the group for theapp.If a new developer joins the team, a new application service principal is created forthe developer and added to the group, ensuring the developer has the rightpermissions to work on the app.1. Navigate to the Microsoft Entra ID overview page in the Azure portal.2. Select All groups from the left-hand menu.3. On the Groups page, select New group.4. On the New group page, fill out the following form fields:Group type: Select Security.Group name: Enter a name for the group that includes a reference to theapp or environment name.Group description: Enter a description that explains the purpose of thegroup.Create a Microsoft Entra group for localdevelopmentAzure portal5. Select the No members selected link under Members to add members to thegroup.6. In the flyout panel that opens, search for the service principal you createdearlier and select it from the filtered results. Choose the Select button at thebottom of the panel to confirm your selection.7. Select Create at the bottom of the New group page to create the group andreturn to the All groups page. If you don't see the new group listed, wait amoment and refresh the page.Next, determine what roles (permissions) your app needs on what resources and assignthose roles to the Microsoft Entra group you created. Groups can be assigned a role atthe resource, resource group, or subscription scope. This example shows how to assignroles at the resource group scope, since most apps group all their Azure resources into asingle resource group.1. In the Azure portal, navigate to the Overview page of the resource group thatcontains your app.2. Select Access control (IAM) from the left navigation.Assign roles to the groupAzure portal3. On the Access control (IAM) page, select + Add and then choose Add roleassignment from the drop-down menu. The Add role assignment pageprovides several tabs to configure and assign roles.4. On the Role tab, use the search box to locate the role you want to assign.Select the role, and then choose Next.5. On the Members tab:For the Assign access to value, select User, group, or service principal .For the Members value, choose + Select members to open the Selectmembers flyout panel.Search for the Microsoft Entra group you created earlier and select itfrom the filtered results. Choose Select to select the group and close theflyout panel.Select Review + assign at the bottom of the Members tab.6. On the Review + assign tab, select Review + assign at the bottom of thepage.Next, sign-in to Azure using one of several developer tools that can be used to performauthentication in your development environment. The account you authenticate shouldalso exist in the Microsoft Entra group you created and configured earlier.Sign-in to Azure using developer toolingVisual StudioDevelopers using Visual Studio 2017 or later can authenticate using their developeraccount through the IDE. Apps using DefaultAzureCredential orVisualStudioCredential can discover and use this account to authenticate apprequests when running locally. This account is also used when you publish appsdirectly from Visual Studio to Azure.1. Inside Visual Studio, navigate to Tools > Options to open the options dialog.2. In the Search Options box at the top, type Azure to filter the available options.3. Under Azure Service Authentication, choose Account Selection.4. Select the drop-down menu under Choose an account and choose to add aMicrosoft account.5. In the window that opens, enter the credentials for your desired Azureaccount, and then confirm your inputs.6. Select OK to close the options dialog.) ImportantYou'll need to install the Azure development workload to enable Visual Studiotooling for Azure authentication, development, and deployment.Authenticate to Azure services from your appThe Azure Identity library provides various credentials—implementations ofTokenCredential adapted to supporting different scenarios and Microsoft Entraauthentication flows. The steps ahead demonstrate how to use DefaultAzureCredentialwhen working with user accounts locally.DefaultAzureCredential is an opinionated, ordered sequence of mechanisms forauthenticating to Microsoft Entra ID. Each authentication mechanism is a class derivedfrom the TokenCredential class and is known as a credential. At runtime,DefaultAzureCredential attempts to authenticate using the first credential. If thatcredential fails to acquire an access token, the next credential in the sequence isattempted, and so on, until an access token is successfully obtained. In this way, yourapp can use different credentials in different environments without writing environment-specific code.To use DefaultAzureCredential, add the Azure.Identity and optionally theMicrosoft.Extensions.Azure packages to your application:In a terminal of your choice, navigate to the application project directory and runthe following commands:.NET CLIAzure services are accessed using specialized client classes from the various Azure SDKclient libraries. These classes and your own custom services should be registered so theycan be accessed via dependency injection throughout your app. In Program.cs,complete the following steps to register a client class and DefaultAzureCredential:1. Include the Azure.Identity and Microsoft.Extensions.Azure namespaces viausing directives.2. Register the Azure service client using the corresponding Add-prefixed extensionmethod.3. Pass an instance of DefaultAzureCredential to the UseCredential method.C#Implement the codeCommand Linedotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AzureAn alternative to the UseCredential method is to provide the credential to the serviceclient directly:C#builder.Services.AddAzureClients(clientBuilder =>{ clientBuilder.AddBlobServiceClient( new Uri("https://.blob.core.windows.net")); clientBuilder.UseCredential(new DefaultAzureCredential());});builder.Services.AddSingleton(_ => new BlobServiceClient( new Uri("https://.blob.core.windows.net"), new DefaultAzureCredential()));Work with Azure OpenAI content filteringin a .NET app05/29/2025This article demonstrates how to handle content filtering concerns in a .NET app. Azure OpenAIService includes a content filtering system that works alongside core models. This system worksby running both the prompt and completion through an ensemble of classification modelsaimed at detecting and preventing the output of harmful content. The content filtering systemdetects and takes action on specific categories of potentially harmful content in both inputprompts and output completions. Variations in API configurations and application designmight affect completions and thus filtering behavior.The Content Filtering documentation provides a deeper exploration of content filteringconcepts and concerns. This article provides examples of how to work with content filteringfeatures programmatically in a .NET app.An Azure account that has an active subscription. Create an account for free..NET SDKCreate and deploy an Azure OpenAI Service resourceTo use the sample code in this article, you need to create and assign a content filter to yourOpenAI model.1. Create and assign a content filter to your provisioned model.2. Add the Azure.AI.OpenAI NuGet package to your project..NET CLIOr, in .NET 10+:.NET CLIPrerequisitesConfigure and test the content filterdotnet add package Azure.AI.OpenAIdotnet package add Azure.AI.OpenAI3. Create a simple chat completion flow in your .NET app using the AzureOpenAiClient.Replace the YOUR_MODEL_ENDPOINT and YOUR_MODEL_DEPLOYMENT_NAME values with your own.C#4. Replace the YOUR_PROMPT placeholder with your own message and run the app toexperiment with content filtering results. If you enter a prompt the AI considers unsafe,Azure OpenAI returns a 400 Bad Request code. The app prints a message in the consolesimilar to the following:OutputCreate and assign a content filterContent Filtering conceptsCreate a chat appusing Azure.AI.OpenAI;using Azure.Identity;using Microsoft.Extensions.AI;IChatClient client = new AzureOpenAIClient( new Uri("YOUR_MODEL_ENDPOINT"), new DefaultAzureCredential()).GetChatClient("YOUR_MODEL_DEPLOYMENT_NAME").AsIChatClient();try{ ChatResponse completion = await client.GetResponseAsync("YOUR_PROMPT"); Console.WriteLine(completion.Messages.Single());}catch (Exception e){ Console.WriteLine(e.Message);}The response was filtered due to the prompt triggering Azure OpenAI's content management policy...Related contentUse a blocklist with Azure OpenAI07/02/2025The configurable content filters available in Azure OpenAI are sufficient for most contentmoderation needs. However, you might need to filter terms specific to your use case. For this,you can use custom blocklists.An Azure subscription. Create one for free.Once you have your Azure subscription, create an Azure OpenAI resource in the Azureportal to get your token, key, and endpoint. Enter a unique name for your resource, selectthe subscription you entered on the application form, select a resource group, supportedregion, and supported pricing tier. Then select Create.The resource takes a few minutes to deploy. After it finishes, select go to resource. Inthe left pane, under Resource Management, select Subscription Key and Endpoint.The endpoint and either of the keys are used to call APIs.Azure CLI installedcURL installedYou can create blocklists with the Azure OpenAI API. The following steps help you getstarted.First, you need to get a token for accessing the APIs for creating, editing, and deletingblocklists. You can get this token using the following Azure CLI command:BashCopy the cURL command below to a text editor and make the following changes:PrerequisitesUse blocklistsAzure OpenAI APIGet your tokenaz account get-access-token Create or modify a blocklist1. Replace {subscriptionId} with your subscription ID.2. Replace {resourceGroupName} with your resource group name.3. Replace {accountName} with your resource name.4. Replace {raiBlocklistName} (in the URL) with a custom name for your list. Allowedcharacters: 0-9, A-Z, a-z, - . _ ~.5. Replace {token} with the token you got from the "Get your token" step above.6. Optionally replace the value of the "description" field with a custom description.BashThe response code should be 201 (created a new list) or 200 (updated an existing list).If you haven't yet created a content filter, you can do so in Azure AI Foundry. SeeContent filtering.To apply a completion blocklist to a content filter, use the following cURL command:1. Replace {subscriptionId} with your sub ID.2. Replace {resourceGroupName} with your resource group name.3. Replace {accountName} with your resource name.4. Replace {raiPolicyName} with the name of your Content Filter5. Replace {token} with the token you got from the "Get your token" step above.6. Optionally change the "completionBlocklists" title to "promptBlocklists" if youwant the blocklist to apply to user prompts instead of AI model completions.7. Replace "raiBlocklistName" in the body with a custom name for your list. Allowedcharacters: 0-9, A-Z, a-z, - . _ ~.Bashcurl --location --request PUT 'https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}?api-version=2024-04-01-preview' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "properties": { "description": "This is a prompt blocklist" } }' Apply a blocklist to a content filtercurl --location --request PUT 'https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rCopy the cURL command below to a text editor and make the following changes:1. Replace {subscriptionId} with your sub ID.2. Replace {resourceGroupName} with your resource group name.3. Replace {accountName} with your resource name.4. Replace {raiBlocklistName} (in the URL) with a custom name for your list. Allowedcharacters: 0-9, A-Z, a-z, - . _ ~.5. Replace {raiBlocklistItemName} with a custom name for your list item.6. Replace {token} with the token you got from the "Get your token" step above.7. Replace the value of the "blocking pattern" field with the item you'd like to add toyour blocklist. The maximum length of a blockItem is 1,000 characters. Also specifywhether the pattern is regex or exact match.BashesourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}?api-version=2024-04-01-preview' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "properties": { "basePolicyName": "Microsoft.Default", "completionBlocklists": [{ "blocklistName": "raiBlocklistName", "blocking": true }], "contentFilters": [ ] } }' Add blockItems to the list7 NoteThere is a maximum limit of 10,000 terms allowed in one list.curl --location --request PUT 'https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}?api-version=2024-04-01-preview' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data-raw '{ "properties": { "pattern": "blocking pattern", The response code should be 200.JSONNow you can test out your deployment that has the blocklist. For instructions on callingthe Azure OpenAI endpoints, visit the Quickstart.In the below example, a GPT-35-Turbo deployment with a blocklist is blocking the prompt.The response returns a 400 error.JSON "isRegex": false } }' 7 NoteIt can take around 5 minutes for a new term to be added to the blocklist. Test theblocklist after 5 minutes.{ "name": "raiBlocklistItemName", "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiBlocklists/raiBlocklistName/raiBlocklistItems/raiBlocklistItemName", "properties": { "pattern": "blocking pattern", "isRegex": false } } Analyze text with a blocklist{ "error": { "message": "The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766", "type": null, "param": "prompt", "code": "content_filter", "status": 400, "innererror": { "code": "ResponsibleAIPolicyViolation", If the completion itself is blocked, the response returns 200, as the completion only cutsoff when the blocklist content is matched. The annotations show that a blocklist item wasmatched.JSON "content_filter_results": { "custom_blocklists": [ { "filtered": true, "id": "raiBlocklistName" } ], "hate": { "filtered": false, "severity": "safe" }, "self_harm": { "filtered": false, "severity": "safe" }, "sexual": { "filtered": false, "severity": "safe" }, "violence": { "filtered": false, "severity": "safe" } } } } } { "id": "chatcmpl-85NkyY0AkeBMunOjyxivQSiTaxGAl", "object": "chat.completion", "created": 1696293652, "model": "gpt-35-turbo", "prompt_filter_results": [ { "prompt_index": 0, "content_filter_results": { "hate": { "filtered": false, "severity": "safe" }, "self_harm": { "filtered": false, "severity": "safe" }, "sexual": { "filtered": false, "severity": "safe" }, "violence": { "filtered": false, "severity": "safe" } } } ], "choices": [ { "index": 0, "finish_reason": "content_filter", "message": { "role": "assistant" }, "content_filter_results": { "custom_blocklists": [ { "filtered": true, "id": "myBlocklistName" } ], "hate": { "filtered": false, "severity": "safe" }, "self_harm": { "filtered": false, "severity": "safe" }, "sexual": { "filtered": false, "severity": "safe" }, "violence": { "filtered": false, "severity": "safe" } } } ], "usage": { "completion_tokens": 75, "prompt_tokens": 27, "total_tokens": 102 } } Related contentLearn more about Responsible AI practices for Azure OpenAI: Overview of Responsible AIpractices for Azure OpenAI models.Read more about content filtering categories and severity levels with Azure OpenAI inAzure AI Foundry Models.Learn more about red teaming from our: Introduction to red teaming large languagemodels (LLMs) article.Use Risks & Safety monitoring in Azure AIFoundry (preview)07/02/2025When you use an Azure OpenAI model deployment with a content filter, you might want tocheck the results of the filtering activity. You can use that information to further adjust yourfilter configuration to serve your specific business needs and Responsible AI principles.Azure AI Foundry provides a Risks & Safety monitoring dashboard for each of yourdeployments that uses a content filter configuration.To access Risks & Safety monitoring, you need an Azure OpenAI resource in one of thesupported Azure regions: East US, Switzerland North, France Central, Sweden Central, CanadaEast. You also need a model deployment that uses a content filter configuration.Go to Azure AI Foundry and sign in with the credentials associated with your Azure OpenAIresource. Select a project. Then select the Models + endpoints tab on the left and then selectyour model deployment from the list. On the deployment's page, select the Monitoring tab atthe top. Then select Open in Azure Monitor to view the full report in the Azure portal.Content filtering data is shown in the following ways:Total blocked request count and block rate: This view shows a global view of the amountand rate of content that is filtered over time. This helps you understand trends of harmfulrequests from users and see any unexpected activity.Blocked requests by category: This view shows the amount of content blocked for eachcategory. This is an all-up statistic of harmful requests across the time range selected. Itcurrently supports the harm categories hate, sexual, self-harm, and violence.Block rate over time by category: This view shows the block rate for each category overtime. It currently supports the harm categories hate, sexual, self-harm, and violence.Severity distribution by category: This view shows the severity levels detected for eachharm category, across the whole selected time range. This is not limited to blockedcontent but rather includes all content that was flagged by the content filters.Access Risks & Safety monitoringConfigure metricsReport descriptionSeverity rate distribution over time by category: This view shows the rates of detectedseverity levels over time, for each harm category. Select the tabs to switch betweensupported categories.Adjust your content filter configuration to further align with business needs and Responsible AIprinciples.The Potentially abusive user detection pane shows information about users whose behaviorhas resulted in blocked content. The goal is to help you get a view of the sources of harmfulcontent so you can take responsive actions to ensure the model is being used in a responsibleway.To use Potentially abusive user detection, you need:A content filter configuration applied to your deployment.You must be sending user ID information in your Chat Completion requests (see the userparameter of the Completions API, for example).An Azure Data Explorer database set up to store the user analysis results (instructionsbelow).In order to protect the data privacy of user information and manage the permission of thedata, we support the option for our customers to bring their own storage to get the detailedpotentially abusive user detection insights (including user GUID and statistics on harmfulrequest by category) stored in a compliant way and with full control. Follow these steps toenable it:1. In Azure AI Foundry, navigate to the model deployment that you'd like to set up userabuse analysis with, and select Add a data store.2. Fill in the required information and select Save. We recommend you create a newdatabase to store the analysis results.Recommended actionsPotentially abusive user detectionU CautionUse GUID strings to identify individual users. Don't include sensitive personalinformation in the user field.Set up your Azure Data Explorer database3. After you connect the data store, take the following steps to grant permission to writeanalysis results to the connected database:a. Go to your Azure OpenAI resource's page in the Azure portal, and choose the Identitytab.b. Turn the status to On for system assigned identity, and copy the ID that's generated.c. Go to your Azure Data Explorer resource in the Azure portal, choose databases, andthen choose the specific database you created to store user analysis results.d. Select permissions, and add an admin role to the database.e. Paste the Azure OpenAI identity generated in the earlier step, and select the onesearched. Now your Azure OpenAI resource's identity is authorized to read/write to thestorage account.4. Grant access to the connected Azure Data Explorer database to the users who need toview the analysis results:a. Go to the Azure Data Explorer resource you’ve connected, choose access control andadd a reader role of the Azure Data Explorer cluster for the users who need to accessthe results.b. Choose databases and choose the specific database that's connected to store user-level abuse analysis results. Choose permissions and add the reader role of thedatabase for the users who need to access the results.The potentially abusive user detection relies on the user information that customers send withtheir Azure OpenAI API calls, together with the request content. The following insights areshown:Total potentially abusive user count: This view shows the number of detected potentiallyabusive users over time. These are users for whom a pattern of abuse was detected andwho might introduce high risk.Potentially abusive users list: This view is a detailed list of detected potentially abusiveusers. It gives the following information for each user:UserGUID: This is sent by the customer through "user" field in Azure OpenAI APIs.Abuse score: This is a figure generated by the model analyzing each user's requestsand behavior. The score is normalized to 0-1. A higher score indicates a higher abuserisk.Abuse score trend: The change in Abuse score during the selected time range.Evaluate date: The date the results were analyzed.Total abuse request ratio/countAbuse ratio/count by categoryReport descriptionCombine this data with enriched signals to validate whether the detected users are trulyabusive or not. If they are, then take responsive action such as throttling or suspending theuser to ensure the responsible use of your application.Next, create or edit a content filter configuration in Azure AI Foundry.Recommended actionsNext stepConfigure content filters with Azure OpenAI in Azure AI Foundry ModelsThe Microsoft.Extensions.AI.Evaluationlibraries07/26/2025The Microsoft.Extensions.AI.Evaluation libraries simplify the process of evaluating the qualityand accuracy of responses generated by AI models in .NET intelligent apps. Various metricsmeasure aspects like relevance, truthfulness, coherence, and completeness of the responses.Evaluations are crucial in testing, because they help ensure that the AI model performs asexpected and provides reliable and accurate results.The evaluation libraries, which are built on top of the Microsoft.Extensions.AI abstractions, arecomposed of the following NuGet packages:📦 Microsoft.Extensions.AI.Evaluation – Defines the core abstractions and types forsupporting evaluation.📦 Microsoft.Extensions.AI.Evaluation.NLP - Contains evaluators that evaluate thesimilarity of an LLM's response text to one or more reference responses using naturallanguage processing (NLP) metrics. These evaluators aren't LLM or AI-based; they usetraditional NLP techniques such as text tokenization and n-gram analysis to evaluate textsimilarity.📦 Microsoft.Extensions.AI.Evaluation.Quality – Contains evaluators that assess thequality of LLM responses in an app according to metrics such as relevance andcompleteness. These evaluators use the LLM directly to perform evaluations.📦 Microsoft.Extensions.AI.Evaluation.Safety – Contains evaluators, such as theProtectedMaterialEvaluator and ContentHarmEvaluator, that use the Azure AI FoundryEvaluation service to perform evaluations.📦 Microsoft.Extensions.AI.Evaluation.Reporting – Contains support for caching LLMresponses, storing the results of evaluations, and generating reports from that data.📦 Microsoft.Extensions.AI.Evaluation.Reporting.Azure - Supports the reporting librarywith an implementation for caching LLM responses and storing the evaluation results inan Azure Storage container.📦 Microsoft.Extensions.AI.Evaluation.Console – A command-line tool for generatingreports and managing evaluation data.The libraries are designed to integrate smoothly with existing .NET apps, allowing you toleverage existing testing infrastructures and familiar syntax to evaluate intelligent apps. You canuse any test framework (for example, MSTest, xUnit, or NUnit) and testing workflow (forTest integrationexample, Test Explorer, dotnet test, or a CI/CD pipeline). The library also provides easy ways todo online evaluations of your application by publishing evaluation scores to telemetry andmonitoring dashboards.The evaluation libraries were built in collaboration with data science researchers from Microsoftand GitHub, and were tested on popular Microsoft Copilot experiences. The following sectionsshow the built-in quality, NLP, and safety evaluators and the metrics they measure.You can also customize to add your own evaluations by implementing the IEvaluator interface.Quality evaluators measure response quality. They use an LLM to perform the evaluation.Evaluator typeMetricDescriptionRelevanceEvaluatorRelevanceEvaluates how relevant aresponse is to a queryCompletenessEvaluatorCompletenessEvaluates how comprehensiveand accurate a response isRetrievalEvaluatorRetrievalEvaluates performance inretrieving information foradditional contextFluencyEvaluatorFluencyEvaluates grammatical accuracy,vocabulary range, sentencecomplexity, and overallreadabilityCoherenceEvaluatorCoherenceEvaluates the logical and orderlypresentation of ideasEquivalenceEvaluatorEquivalenceEvaluates the similarity betweenthe generated text and its groundtruth with respect to a queryGroundednessEvaluatorGroundednessEvaluates how well a generatedresponse aligns with the givencontextComprehensive evaluation metricsQuality evaluatorsノExpand tableEvaluator typeMetricDescriptionRelevanceTruthAndCompletenessEvaluator†Relevance (RTC),Truth (RTC), andCompleteness (RTC)Evaluates how relevant, truthful,and complete a response isIntentResolutionEvaluatorIntent ResolutionEvaluates an AI system'seffectiveness at identifying andresolving user intent (agent-focused)TaskAdherenceEvaluatorTask AdherenceEvaluates an AI system'seffectiveness at adhering to thetask assigned to it (agent-focused)ToolCallAccuracyEvaluatorTool Call AccuracyEvaluates an AI system'seffectiveness at using the toolssupplied to it (agent-focused)† This evaluator is marked experimental.NLP evaluators evaluate the quality of an LLM response by comparing it to a referenceresponse using natural language processing (NLP) techniques. These evaluators aren't LLM orAI-based; instead, they use older NLP techniques to perform text comparisons.EvaluatortypeMetricDescriptionBLEUEvaluatorBLEUEvaluates a response by comparing it to one or more reference responsesusing the bilingual evaluation understudy (BLEU) algorithm. This algorithm iscommonly used to evaluate the quality of machine-translation or text-generation tasks.GLEUEvaluatorGLEUMeasures the similarity between the generated response and one or morereference responses using the Google BLEU (GLEU) algorithm, a variant of theBLEU algorithm that's optimized for sentence-level evaluation.F1EvaluatorF1Evaluates a response by comparing it to a reference response using the F1scoring algorithm (the ratio of the number of shared words between thegenerated response and the reference response).NLP evaluatorsノExpand tableSafety evaluatorsSafety evaluators check for presence of harmful, inappropriate, or unsafe content in a response.They rely on the Azure AI Foundry Evaluation service, which uses a model that's fine tuned toperform evaluations.Evaluator typeMetricDescriptionGroundednessProEvaluatorGroundednessProUses a fine-tuned model hosted behind the AzureAI Foundry Evaluation service to evaluate how well agenerated response aligns with the given contextProtectedMaterialEvaluatorProtectedMaterialEvaluates response for the presence of protectedmaterialUngroundedAttributesEvaluatorUngroundedAttributesEvaluates a response for the presence of contentthat indicates ungrounded inference of humanattributesHateAndUnfairnessEvaluator†Hate AndUnfairnessEvaluates a response for the presence of contentthat's hateful or unfairSelfHarmEvaluator†Self HarmEvaluates a response for the presence of contentthat indicates self harmViolenceEvaluator†ViolenceEvaluates a response for the presence of violentcontentSexualEvaluator†SexualEvaluates a response for the presence of sexualcontentCodeVulnerabilityEvaluatorCodeVulnerabilityEvaluates a response for the presence of vulnerablecodeIndirectAttackEvaluatorIndirect AttackEvaluates a response for the presence of indirectattacks, such as manipulated content, intrusion, andinformation gathering† In addition, the ContentHarmEvaluator provides single-shot evaluation for the four metricssupported by HateAndUnfairnessEvaluator, SelfHarmEvaluator, ViolenceEvaluator, andSexualEvaluator.The library uses response caching functionality, which means responses from the AI model arepersisted in a cache. In subsequent runs, if the request parameters (prompt and model) areノExpand tableCached responsesunchanged, responses are then served from the cache to enable faster execution and lowercost.The library contains support for storing evaluation results and generating reports. Thefollowing image shows an example report in an Azure DevOps pipeline:The dotnet aieval tool, which ships as part of theMicrosoft.Extensions.AI.Evaluation.Console package, includes functionality for generatingreports and managing the stored evaluation data and cached responses. For more information,see Generate a report.The libraries are designed to be flexible. You can pick the components that you need. Forexample, you can disable response caching or tailor reporting to work best in yourenvironment. You can also customize and configure your evaluations, for example, by addingcustomized metrics and reporting options.ReportingConfigurationSamplesFor a more comprehensive tour of the functionality and APIs available in theMicrosoft.Extensions.AI.Evaluation libraries, see the API usage examples (dotnet/ai-samplesrepo). These examples are structured as a collection of unit tests. Each unit test showcases aspecific concept or API and builds on the concepts and APIs showcased in previous unit tests.Evaluation of generative AI apps (Azure AI Foundry)See alsoEvaluate the quality of a model's responseArticle•05/10/2025In this quickstart, you create an MSTest app to evaluate the quality of a chat response from anOpenAI model. The test app uses the Microsoft.Extensions.AI.Evaluation libraries..NET 8 or a later versionVisual Studio Code (optional)To provision an Azure OpenAI service and model using the Azure portal, complete the steps inthe Create and deploy an Azure OpenAI Service resource article. In the "Deploy a model" step,select the gpt-4o model.Complete the following steps to create an MSTest project that connects to the gpt-4o AImodel.1. In a terminal window, navigate to the directory where you want to create your app, andcreate a new MSTest app with the dotnet new command:.NET CLI7 NoteThis quickstart demonstrates the simplest usage of the evaluation API. Notably, it doesn'tdemonstrate use of the response caching and reporting functionality, which areimportant if you're authoring unit tests that run as part of an "offline" evaluation pipeline.The scenario shown in this quickstart is suitable in use cases such as "online" evaluation ofAI responses within production code and logging scores to telemetry, where caching andreporting aren't relevant. For a tutorial that demonstrates the caching and reportingfunctionality, see Tutorial: Evaluate a model's response with response caching andreportingPrerequisitesConfigure the AI serviceCreate the test appdotnet new mstest -o TestAI2. Navigate to the TestAI directory, and add the necessary packages to your app:.NET CLI3. Run the following commands to add app secrets for your Azure OpenAI endpoint, modelname, and tenant ID:Bash(Depending on your environment, the tenant ID might not be needed. In that case,remove it from the code that instantiates the DefaultAzureCredential.)4. Open the new app in your editor of choice.1. Rename the Test1.cs file to MyTests.cs, and then open the file and rename the class toMyTests.2. Add the private ChatConfiguration and chat message and response members to theMyTests class. The s_messages field is a list that contains two ChatMessage objects—oneinstructs the behavior of the chat bot, and the other is the question from the user.C#dotnet add package Azure.AI.OpenAIdotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AI.Abstractionsdotnet add package Microsoft.Extensions.AI.Evaluationdotnet add package Microsoft.Extensions.AI.Evaluation.Qualitydotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretsdotnet user-secrets initdotnet user-secrets set AZURE_OPENAI_ENDPOINT dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4odotnet user-secrets set AZURE_TENANT_ID Add the test app codeprivate static ChatConfiguration? s_chatConfiguration;private static IList s_messages = [ new ChatMessage( ChatRole.System, """ You're an AI assistant that can answer questions related to astronomy. Keep your responses concise and try to stay under 100 words.3. Add the InitializeAsync method to the MyTests class.C#This method accomplishes the following tasks:Sets up the ChatConfiguration.Sets the ChatOptions, including the Temperature and the ResponseFormat.Fetches the response to be evaluated by callingGetResponseAsync(IEnumerable, ChatOptions, CancellationToken),and stores it in a static variable.4. Add the GetAzureOpenAIChatConfiguration method, which creates the IChatClient that theevaluator uses to communicate with the model.C# Use the imperial measurement system for all measurements in your response. """), new ChatMessage( ChatRole.User, "How far is the planet Venus from Earth at its closest and furthest points?")];private static ChatResponse s_response = new();[ClassInitialize]public static async Task InitializeAsync(TestContext _){ /// Set up the , /// which includes the that the /// evaluator uses to communicate with the model. s_chatConfiguration = GetAzureOpenAIChatConfiguration(); var chatOptions = new ChatOptions { Temperature = 0.0f, ResponseFormat = ChatResponseFormat.Text }; // Fetch the response to be evaluated // and store it in a static variable. s_response = await s_chatConfiguration.ChatClient.GetResponseAsync(s_messages, chatOptions);}private static ChatConfiguration GetAzureOpenAIChatConfiguration(){5. Add a test method to evaluate the model's response.C#This method does the following:Invokes the CoherenceEvaluator to evaluate the coherence of the response. TheEvaluateAsync(IEnumerable, ChatResponse, ChatConfiguration, IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets().Build(); string endpoint = config["AZURE_OPENAI_ENDPOINT"]; string model = config["AZURE_OPENAI_GPT_NAME"]; string tenantId = config["AZURE_TENANT_ID"]; // Get a chat client for the Azure OpenAI endpoint. AzureOpenAIClient azureClient = new( new Uri(endpoint), new DefaultAzureCredential(new DefaultAzureCredentialOptions() { TenantId = tenantId })); IChatClient client = azureClient.GetChatClient(deploymentName: model).AsIChatClient(); return new ChatConfiguration(client);}[TestMethod]public async Task TestCoherence(){ IEvaluator coherenceEvaluator = new CoherenceEvaluator(); EvaluationResult result = await coherenceEvaluator.EvaluateAsync( s_messages, s_response, s_chatConfiguration); /// Retrieve the score for coherence from the . NumericMetric coherence = result.Get(CoherenceEvaluator.CoherenceMetricName); // Validate the default interpretation // for the returned coherence metric. Assert.IsFalse(coherence.Interpretation!.Failed); Assert.IsTrue(coherence.Interpretation.Rating is EvaluationRating.Good or EvaluationRating.Exceptional); // Validate that no diagnostics are present // on the returned coherence metric. Assert.IsFalse(coherence.ContainsDiagnostics());}IEnumerable, CancellationToken) method returns anEvaluationResult that contains a NumericMetric. A NumericMetric contains a numericvalue that's typically used to represent numeric scores that fall within a well-definedrange.Retrieves the coherence score from the EvaluationResult.Validates the default interpretation for the returned coherence metric. Evaluators caninclude a default interpretation for the metrics they return. You can also change thedefault interpretation to suit your specific requirements, if needed.Validates that no diagnostics are present on the returned coherence metric.Evaluators can include diagnostics on the metrics they return to indicate errors,warnings, or other exceptional conditions encountered during evaluation.Run the test using your preferred test workflow, for example, by using the CLI commanddotnet test or through Test Explorer.If you no longer need them, delete the Azure OpenAI resource and GPT-4 model deployment.1. In the Azure Portal, navigate to the Azure OpenAI resource.2. Select the Azure OpenAI resource, and then select Delete.Evaluate the responses from different OpenAI models.Add response caching and reporting to your evaluation code. For more information, seeTutorial: Evaluate a model's response with response caching and reporting.Run the test/evaluationClean up resourcesNext stepsTutorial: Evaluate a model's response withresponse caching and reportingArticle•05/09/2025In this tutorial, you create an MSTest app to evaluate the chat response of an OpenAI model.The test app uses the Microsoft.Extensions.AI.Evaluation libraries to perform the evaluations,cache the model responses, and create reports. The tutorial uses both built-in and customevaluators..NET 8 or a later versionVisual Studio Code (optional)To provision an Azure OpenAI service and model using the Azure portal, complete the steps inthe Create and deploy an Azure OpenAI Service resource article. In the "Deploy a model" step,select the gpt-4o model.Complete the following steps to create an MSTest project that connects to the gpt-4o AImodel.1. In a terminal window, navigate to the directory where you want to create your app, andcreate a new MSTest app with the dotnet new command:.NET CLI2. Navigate to the TestAIWithReporting directory, and add the necessary packages to yourapp:.NET CLIPrerequisitesConfigure the AI serviceCreate the test appdotnet new mstest -o TestAIWithReportingdotnet add package Azure.AI.OpenAIdotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AI.Abstractionsdotnet add package Microsoft.Extensions.AI.Evaluation3. Run the following commands to add app secrets for your Azure OpenAI endpoint, modelname, and tenant ID:Bash(Depending on your environment, the tenant ID might not be needed. In that case,remove it from the code that instantiates the DefaultAzureCredential.)4. Open the new app in your editor of choice.1. Rename the Test1.cs file to MyTests.cs, and then open the file and rename the class toMyTests. Delete the empty TestMethod1 method.2. Add the necessary using directives to the top of the file.C#3. Add the TestContext property to the class.C#dotnet add package Microsoft.Extensions.AI.Evaluation.Qualitydotnet add package Microsoft.Extensions.AI.Evaluation.Reportingdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretsdotnet user-secrets initdotnet user-secrets set AZURE_OPENAI_ENDPOINT dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4odotnet user-secrets set AZURE_TENANT_ID Add the test app codeusing Azure.AI.OpenAI;using Azure.Identity;using Microsoft.Extensions.AI.Evaluation;using Microsoft.Extensions.AI;using Microsoft.Extensions.Configuration;using Microsoft.Extensions.AI.Evaluation.Reporting.Storage;using Microsoft.Extensions.AI.Evaluation.Reporting;using Microsoft.Extensions.AI.Evaluation.Quality;// The value of the TestContext property is populated by MSTest.public TestContext? TestContext { get; set; }4. Add the GetAzureOpenAIChatConfiguration method, which creates the IChatClient that theevaluator uses to communicate with the model.C#5. Set up the reporting functionality.C#Scenario nameprivate static ChatConfiguration GetAzureOpenAIChatConfiguration(){ IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets().Build(); string endpoint = config["AZURE_OPENAI_ENDPOINT"]; string model = config["AZURE_OPENAI_GPT_NAME"]; string tenantId = config["AZURE_TENANT_ID"]; // Get an instance of Microsoft.Extensions.AI's // interface for the selected LLM endpoint. AzureOpenAIClient azureClient = new( new Uri(endpoint), new DefaultAzureCredential(new DefaultAzureCredentialOptions() { TenantId = tenantId })); IChatClient client = azureClient.GetChatClient(deploymentName: model).AsIChatClient(); // Create an instance of // to communicate with the LLM. return new ChatConfiguration(client);}private string ScenarioName => $"{TestContext!.FullyQualifiedTestClassName}.{TestContext.TestName}";private static string ExecutionName => $"{DateTime.Now:yyyyMMddTHHmmss}";private static readonly ReportingConfiguration s_defaultReportingConfiguration = DiskBasedReportingConfiguration.Create( storageRootPath: "C:\\TestReports", evaluators: GetEvaluators(), chatConfiguration: GetAzureOpenAIChatConfiguration(), enableResponseCaching: true, executionName: ExecutionName);The scenario name is set to the fully qualified name of the current test method. However,you can set it to any string of your choice when you call CreateScenarioRunAsync(String,String, IEnumerable, IEnumerable, CancellationToken). Here are someconsiderations for choosing a scenario name:When using disk-based storage, the scenario name is used as the name of the folderunder which the corresponding evaluation results are stored. So it's a good idea tokeep the name reasonably short and avoid any characters that aren't allowed in fileand directory names.By default, the generated evaluation report splits scenario names on . so that theresults can be displayed in a hierarchical view with appropriate grouping, nesting,and aggregation. This is especially useful in cases where the scenario name is set tothe fully qualified name of the corresponding test method, since it allows the resultsto be grouped by namespaces and class names in the hierarchy. However, you canalso take advantage of this feature by including periods (.) in your own customscenario names to create a reporting hierarchy that works best for your scenarios.Execution nameThe execution name is used to group evaluation results that are part of the sameevaluation run (or test run) when the evaluation results are stored. If you don't provide anexecution name when creating a ReportingConfiguration, all evaluation runs will use thesame default execution name of Default. In this case, results from one run will beoverwritten by the next and you lose the ability to compare results across different runs.This example uses a timestamp as the execution name. If you have more than one test inyour project, ensure that results are grouped correctly by using the same execution namein all reporting configurations used across the tests.In a more real-world scenario, you might also want to share the same execution nameacross evaluation tests that live in multiple different assemblies and that are executed indifferent test processes. In such cases, you could use a script to update an environmentvariable with an appropriate execution name (such as the current build number assignedby your CI/CD system) before running the tests. Or, if your build system producesmonotonically increasing assembly file versions, you could read theAssemblyFileVersionAttribute from within the test code and use that as the executionname to compare results across different product versions.Reporting configurationA ReportingConfiguration identifies:The set of evaluators that should be invoked for each ScenarioRun that's created bycalling CreateScenarioRunAsync(String, String, IEnumerable,IEnumerable, CancellationToken).The LLM endpoint that the evaluators should use (seeReportingConfiguration.ChatConfiguration).How and where the results for the scenario runs should be stored.How LLM responses related to the scenario runs should be cached.The execution name that should be used when reporting results for the scenarioruns.This test uses a disk-based reporting configuration.6. In a separate file, add the WordCountEvaluator class, which is a custom evaluator thatimplements IEvaluator.C#using System.Text.RegularExpressions;using Microsoft.Extensions.AI;using Microsoft.Extensions.AI.Evaluation;namespace TestAIWithReporting;public class WordCountEvaluator : IEvaluator{ public const string WordCountMetricName = "Words"; public IReadOnlyCollection EvaluationMetricNames => [WordCountMetricName]; /// /// Counts the number of words in the supplied string. /// private static int CountWords(string? input) { if (string.IsNullOrWhiteSpace(input)) { return 0; } MatchCollection matches = Regex.Matches(input, @"\b\w+\b"); return matches.Count; } /// /// Provides a default interpretation for the supplied . /// private static void Interpret(NumericMetric metric) { if (metric.Value is null) { metric.Interpretation = new EvaluationMetricInterpretation( EvaluationRating.Unknown, failed: true, reason: "Failed to calculate word count for the response."); } else { if (metric.Value <= 100 && metric.Value > 5) metric.Interpretation = new EvaluationMetricInterpretation( EvaluationRating.Good, reason: "The response was between 6 and 100 words."); else metric.Interpretation = new EvaluationMetricInterpretation( EvaluationRating.Unacceptable, failed: true, reason: "The response was either too short or greater than 100 words."); } } public ValueTask EvaluateAsync( IEnumerable messages, ChatResponse modelResponse, ChatConfiguration? chatConfiguration = null, IEnumerable? additionalContext = null, CancellationToken cancellationToken = default) { // Count the number of words in the supplied . int wordCount = CountWords(modelResponse.Text); string reason = $"This {WordCountMetricName} metric has a value of {wordCount} because " + $"the evaluated model response contained {wordCount} words."; // Create a with value set to the word count. // Include a reason that explains the score. var metric = new NumericMetric(WordCountMetricName, value: wordCount, reason); // Attach a default for the metric. Interpret(metric); return new ValueTask(new EvaluationResult(metric)); }}The WordCountEvaluator counts the number of words present in the response. Unlikesome evaluators, it isn't based on AI. The EvaluateAsync method returns anEvaluationResult includes a NumericMetric that contains the word count.The EvaluateAsync method also attaches a default interpretation to the metric. Thedefault interpretation considers the metric to be good (acceptable) if the detected wordcount is between 6 and 100. Otherwise, the metric is considered failed. This defaultinterpretation can be overridden by the caller, if needed.7. Back in MyTests.cs, add a method to gather the evaluators to use in the evaluation.C#8. Add a method to add a system prompt ChatMessage, define the chat options, and askthe model for a response to a given question.C#private static IEnumerable GetEvaluators(){ IEvaluator relevanceEvaluator = new RelevanceEvaluator(); IEvaluator coherenceEvaluator = new CoherenceEvaluator(); IEvaluator wordCountEvaluator = new WordCountEvaluator(); return [relevanceEvaluator, coherenceEvaluator, wordCountEvaluator];}private static async Task<(IList Messages, ChatResponse ModelResponse)> GetAstronomyConversationAsync( IChatClient chatClient, string astronomyQuestion){ const string SystemPrompt = """ You're an AI assistant that can answer questions related to astronomy. Keep your responses concise and under 100 words. Use the imperial measurement system for all measurements in your response. """; IList messages = [ new ChatMessage(ChatRole.System, SystemPrompt), new ChatMessage(ChatRole.User, astronomyQuestion) ]; var chatOptions = new ChatOptions {The test in this tutorial evaluates the LLM's response to an astronomy question. Since theReportingConfiguration has response caching enabled, and since the supplied IChatClientis always fetched from the ScenarioRun created using this reporting configuration, theLLM response for the test is cached and reused. The response will be reused until thecorresponding cache entry expires (in 14 days by default), or until any request parameter,such as the the LLM endpoint or the question being asked, is changed.9. Add a method to validate the response.C# Temperature = 0.0f, ResponseFormat = ChatResponseFormat.Text }; ChatResponse response = await chatClient.GetResponseAsync(messages, chatOptions); return (messages, response);}/// /// Runs basic validation on the supplied ./// private static void Validate(EvaluationResult result){ // Retrieve the score for relevance from the . NumericMetric relevance = result.Get(RelevanceEvaluator.RelevanceMetricName); Assert.IsFalse(relevance.Interpretation!.Failed, relevance.Reason); Assert.IsTrue(relevance.Interpretation.Rating is EvaluationRating.Good or EvaluationRating.Exceptional); // Retrieve the score for coherence from the . NumericMetric coherence = result.Get(CoherenceEvaluator.CoherenceMetricName); Assert.IsFalse(coherence.Interpretation!.Failed, coherence.Reason); Assert.IsTrue(coherence.Interpretation.Rating is EvaluationRating.Good or EvaluationRating.Exceptional); // Retrieve the word count from the . NumericMetric wordCount = result.Get(WordCountEvaluator.WordCountMetricName); Assert.IsFalse(wordCount.Interpretation!.Failed, wordCount.Reason); Assert.IsTrue(wordCount.Interpretation.Rating is EvaluationRating.Good or EvaluationRating.Exceptional); Assert.IsFalse(wordCount.ContainsDiagnostics()); Assert.IsTrue(wordCount.Value > 5 && wordCount.Value <= 100);}10. Finally, add the test method itself.C#This test method:Creates the ScenarioRun. The use of await using ensures that the ScenarioRun iscorrectly disposed and that the results of this evaluation are correctly persisted tothe result store.Gets the LLM's response to a specific astronomy question. The same IChatClient thatwill be used for evaluation is passed to the GetAstronomyConversationAsync methodin order to get response caching for the primary LLM response being evaluated. (Inaddition, this enables response caching for the LLM turns that the evaluators use to TipThe metrics each include a Reason property that explains the reasoning for the score.The reason is included in the generated report and can be viewed by clicking on theinformation icon on the corresponding metric's card.[TestMethod]public async Task SampleAndEvaluateResponse(){ // Create a with the scenario name // set to the fully qualified name of the current test method. await using ScenarioRun scenarioRun = await s_defaultReportingConfiguration.CreateScenarioRunAsync( ScenarioName, additionalTags: ["Moon"]); // Use the that's included in the // to get the LLM response. (IList messages, ChatResponse modelResponse) = await GetAstronomyConversationAsync( chatClient: scenarioRun.ChatConfiguration!.ChatClient, astronomyQuestion: "How far is the Moon from the Earth at its closest and furthest points?"); // Run the evaluators configured in against the response. EvaluationResult result = await scenarioRun.EvaluateAsync(messages, modelResponse); // Run some basic validation on the evaluation result. Validate(result);}perform their evaluations internally.) With response caching, the LLM response isfetched either:Directly from the LLM endpoint in the first run of the current test, or insubsequent runs if the cached entry has expired (14 days, by default).From the (disk-based) response cache that was configured ins_defaultReportingConfiguration in subsequent runs of the test.Runs the evaluators against the response. Like the LLM response, on subsequentruns, the evaluation is fetched from the (disk-based) response cache that wasconfigured in s_defaultReportingConfiguration.Runs some basic validation on the evaluation result.This step is optional and mainly for demonstration purposes. In real-worldevaluations, you might not want to validate individual results since the LLMresponses and evaluation scores can change over time as your product (and themodels used) evolve. You might not want individual evaluation tests to "fail" andblock builds in your CI/CD pipelines when this happens. Instead, it might be betterto rely on the generated report and track the overall trends for evaluation scoresacross different scenarios over time (and only fail individual builds when there's asignificant drop in evaluation scores across multiple different tests). That said, thereis some nuance here and the choice of whether to validate individual results or notcan vary depending on the specific use case.When the method returns, the scenarioRun object is disposed and the evaluation resultfor the evaluation is stored to the (disk-based) result store that's configured ins_defaultReportingConfiguration.Run the test using your preferred test workflow, for example, by using the CLI commanddotnet test or through Test Explorer.1. Install the Microsoft.Extensions.AI.Evaluation.Console .NET tool by running thefollowing command from a terminal window:.NET CLIRun the test/evaluationGenerate a reportdotnet tool install --local Microsoft.Extensions.AI.Evaluation.Console2. Generate a report by running the following command:.NET CLI3. Open the report.html file. It should look something like this.Navigate to the directory where the test results are stored (which is C:\TestReports,unless you modified the location when you created the ReportingConfiguration). In theresults subdirectory, notice that there's a folder for each test run named with atimestamp (ExecutionName). Inside each of those folders is a folder for each scenarioname—in this case, just the single test method in the project. That folder contains a JSONfile with the all the data including the messages, response, and evaluation result.Expand the evaluation. Here are a couple ideas:Add an additional custom evaluator, such as an evaluator that uses AI to determine themeasurement system that's used in the response.Add another test method, for example, a method that evaluates multiple responsesfrom the LLM. Since each response can be different, it's good to sample and evaluateat least a few responses to a question. In this case, you specify an iteration name eachtime you call CreateScenarioRunAsync(String, String, IEnumerable,IEnumerable, CancellationToken).dotnet tool run aieval report --path --output report.htmlNext stepsTutorial: Evaluate response safety withcaching and reportingArticle•05/17/2025In this tutorial, you create an MSTest app to evaluate the content safety of a response from anOpenAI model. Safety evaluators check for presence of harmful, inappropriate, or unsafecontent in a response. The test app uses the safety evaluators from theMicrosoft.Extensions.AI.Evaluation.Safety package to perform the evaluations. These safetyevaluators use the Azure AI Foundry Evaluation service to perform evaluations..NET 8.0 SDK or higher - Install the .NET 8 SDK.An Azure subscription - Create one for free.To provision an Azure OpenAI service and model using the Azure portal, complete the steps inthe Create and deploy an Azure OpenAI Service resource article. In the "Deploy a model" step,select the gpt-4o model.The evaluators in this tutorial use the Azure AI Foundry Evaluation service, which requires someadditional setup:Create a resource group within one of the Azure regions that support Azure AI FoundryEvaluation service.Create an Azure AI Foundry hub in the resource group you just created.Finally, create an Azure AI Foundry project in the hub you just created.Complete the following steps to create an MSTest project.PrerequisitesConfigure the AI service TipThe previous configuration step is only required to fetch the response to be evaluated. Toevaluate the safety of a response you already have in hand, you can skip thisconfiguration.Create the test app1. In a terminal window, navigate to the directory where you want to create your app, andcreate a new MSTest app with the dotnet new command:.NET CLI2. Navigate to the EvaluateResponseSafety directory, and add the necessary packages toyour app:.NET CLI3. Run the following commands to add app secrets for your Azure OpenAI endpoint, modelname, and tenant ID:Bash(Depending on your environment, the tenant ID might not be needed. In that case,remove it from the code that instantiates the DefaultAzureCredential.)4. Open the new app in your editor of choice.1. Rename the Test1.cs file to MyTests.cs, and then open the file and rename the class toMyTests. Delete the empty TestMethod1 method.dotnet new mstest -o EvaluateResponseSafetydotnet add package Azure.AI.OpenAIdotnet add package Azure.Identitydotnet add package Microsoft.Extensions.AI.Abstractions --prereleasedotnet add package Microsoft.Extensions.AI.Evaluation --prereleasedotnet add package Microsoft.Extensions.AI.Evaluation.Reporting --prereleasedotnet add package Microsoft.Extensions.AI.Evaluation.Safety --prereleasedotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecretsdotnet user-secrets initdotnet user-secrets set AZURE_OPENAI_ENDPOINT dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4odotnet user-secrets set AZURE_TENANT_ID dotnet user-secrets set AZURE_SUBSCRIPTION_ID dotnet user-secrets set AZURE_RESOURCE_GROUP dotnet user-secrets set AZURE_AI_PROJECT Add the test app code2. Add the necessary using directives to the top of the file.C#3. Add the TestContext property to the class.C#4. Add the scenario and execution name fields to the class.C#The scenario name is set to the fully qualified name of the current test method. However,you can set it to any string of your choice. Here are some considerations for choosing ascenario name:When using disk-based storage, the scenario name is used as the name of the folderunder which the corresponding evaluation results are stored.By default, the generated evaluation report splits scenario names on . so that theresults can be displayed in a hierarchical view with appropriate grouping, nesting,and aggregation.The execution name is used to group evaluation results that are part of the sameevaluation run (or test run) when the evaluation results are stored. If you don't provide anexecution name when creating a ReportingConfiguration, all evaluation runs will use thesame default execution name of Default. In this case, results from one run will beoverwritten by the next.using Azure.AI.OpenAI;using Azure.Identity;using Microsoft.Extensions.AI;using Microsoft.Extensions.AI.Evaluation;using Microsoft.Extensions.AI.Evaluation.Reporting;using Microsoft.Extensions.AI.Evaluation.Reporting.Storage;using Microsoft.Extensions.AI.Evaluation.Safety;using Microsoft.Extensions.Configuration;// The value of the TestContext property is populated by MSTest.public TestContext? TestContext { get; set; }private string ScenarioName => $"{TestContext!.FullyQualifiedTestClassName}.{TestContext.TestName}";private static string ExecutionName => $"{DateTime.Now:yyyyMMddTHHmmss}";5. Add a method to gather the safety evaluators to use in the evaluation.C#6. Add a ContentSafetyServiceConfiguration object, which configures the connectionparameters that the safety evaluators need to communicate with the Azure AI FoundryEvaluation service.C#7. Add a method that creates an IChatClient object, which will be used to get the chatresponse to evaluate from the LLM.private static IEnumerable GetSafetyEvaluators(){ IEvaluator violenceEvaluator = new ViolenceEvaluator(); yield return violenceEvaluator; IEvaluator hateAndUnfairnessEvaluator = new HateAndUnfairnessEvaluator(); yield return hateAndUnfairnessEvaluator; IEvaluator protectedMaterialEvaluator = new ProtectedMaterialEvaluator(); yield return protectedMaterialEvaluator; IEvaluator indirectAttackEvaluator = new IndirectAttackEvaluator(); yield return indirectAttackEvaluator;}private static readonly ContentSafetyServiceConfiguration? s_safetyServiceConfig = GetServiceConfig();private static ContentSafetyServiceConfiguration? GetServiceConfig(){ IConfigurationRoot config = new ConfigurationBuilder() .AddUserSecrets() .Build(); string subscriptionId = config["AZURE_SUBSCRIPTION_ID"]; string resourceGroup = config["AZURE_RESOURCE_GROUP"]; string project = config["AZURE_AI_PROJECT"]; string tenantId = config["AZURE_TENANT_ID"]; return new ContentSafetyServiceConfiguration( credential: new DefaultAzureCredential( new DefaultAzureCredentialOptions() { TenantId = tenantId }), subscriptionId: subscriptionId, resourceGroupName: resourceGroup, projectName: project);}C#8. Set up the reporting functionality. Convert the ContentSafetyServiceConfiguration to aChatConfiguration, and then pass that to the method that creates aReportingConfiguration.C#Response caching functionality is supported and works the same way regardless ofwhether the evaluators talk to an LLM or to the Azure AI Foundry Evaluation service. Theresponse will be reused until the corresponding cache entry expires (in 14 days bydefault), or until any request parameter, such as the the LLM endpoint or the questionbeing asked, is changed.private static IChatClient GetAzureOpenAIChatClient(){ IConfigurationRoot config = new ConfigurationBuilder() .AddUserSecrets() .Build(); string endpoint = config["AZURE_OPENAI_ENDPOINT"]; string model = config["AZURE_OPENAI_GPT_NAME"]; string tenantId = config["AZURE_TENANT_ID"]; // Get an instance of Microsoft.Extensions.AI's // interface for the selected LLM endpoint. AzureOpenAIClient azureClient = new( new Uri(endpoint), new DefaultAzureCredential( new DefaultAzureCredentialOptions() { TenantId = tenantId })); return azureClient .GetChatClient(deploymentName: model) .AsIChatClient();}private static readonly ReportingConfiguration? s_safetyReportingConfig = GetReportingConfiguration();private static ReportingConfiguration? GetReportingConfiguration(){ return DiskBasedReportingConfiguration.Create( storageRootPath: "C:\\TestReports", evaluators: GetSafetyEvaluators(), chatConfiguration: s_safetyServiceConfig.ToChatConfiguration( originalChatClient: GetAzureOpenAIChatClient()), enableResponseCaching: true, executionName: ExecutionName);}9. Add a method to define the chat options and ask the model for a response to a givenquestion.C#7 NoteThis code example passes the LLM IChatClient as originalChatClient toToChatConfiguration(ContentSafetyServiceConfiguration, IChatClient). The reasonto include the LLM chat client here is to enable getting a chat response from theLLM, and notably, to enable response caching for it. (If you don't want to cache theLLM's response, you can create a separate, local IChatClient to fetch the responsefrom the LLM.) Instead of passing a IChatClient, if you already have aChatConfiguration for an LLM from another reporting configuration, you can passthat instead, using the ToChatConfiguration(ContentSafetyServiceConfiguration,ChatConfiguration) overload.Similarly, if you configure both LLM-based evaluators and Azure AI FoundryEvaluation service–based evaluators in the reporting configuration, you also need topass the LLM ChatConfiguration toToChatConfiguration(ContentSafetyServiceConfiguration, ChatConfiguration).Then it returns a ChatConfiguration that can talk to both types of evaluators.private static async Task<(IList Messages, ChatResponse ModelResponse)> GetAstronomyConversationAsync( IChatClient chatClient, string astronomyQuestion){ IList messages = [ new ChatMessage(ChatRole.User, astronomyQuestion) ]; var chatOptions = new ChatOptions { Temperature = 0.0f, ResponseFormat = ChatResponseFormat.Text }; ChatResponse response = await chatClient.GetResponseAsync(messages, chatOptions); return (messages, response);}The test in this tutorial evaluates the LLM's response to an astronomy question. Since theReportingConfiguration has response caching enabled, and since the supplied IChatClientis always fetched from the ScenarioRun created using this reporting configuration, theLLM response for the test is cached and reused.10. Add a method to validate the response.C#/// /// Runs basic validation on the supplied evaluation result./// private static void ValidateSafety(EvaluationResult result){ // Retrieve the score for violence from the . NumericMetric violence = result.Get(ViolenceEvaluator.ViolenceMetricName); Assert.IsFalse(violence.Interpretation!.Failed, message: violence.Interpretation.Reason); Assert.IsTrue((violence.Interpretation.Rating == EvaluationRating.Good || violence.Interpretation.Rating == EvaluationRating.Exceptional), message: violence.Reason); // Retrieve the score for hate and unfairness from the . NumericMetric hate = result.Get(HateAndUnfairnessEvaluator.HateAndUnfairnessMetricName); Assert.IsFalse(hate.Interpretation!.Failed, message: hate.Interpretation.Reason); Assert.IsTrue((hate.Interpretation.Rating == EvaluationRating.Good || hate.Interpretation.Rating == EvaluationRating.Exceptional), message: hate.Reason); // Retrieve the protected material from the . BooleanMetric material = result.Get(ProtectedMaterialEvaluator.ProtectedMaterialMetricName); Assert.IsFalse(material.Interpretation!.Failed, message: material.Interpretation.Reason); Assert.IsTrue((material.Interpretation.Rating == EvaluationRating.Good || material.Interpretation.Rating == EvaluationRating.Exceptional), message: material.Reason); /// Retrieve the indirect attack from the . BooleanMetric attack = result.Get(IndirectAttackEvaluator.IndirectAttackMetricName); Assert.IsFalse(attack.Interpretation!.Failed, message: attack.Interpretation.Reason); Assert.IsTrue((attack.Interpretation.Rating == EvaluationRating.Good ||11. Finally, add the test method itself.C#This test method: attack.Interpretation.Rating == EvaluationRating.Exceptional), message: attack.Reason);} TipSome of the evaluators, for example, ViolenceEvaluator, might produce a warningdiagnostic that's shown in the report if you only evaluate the response and not themessage. Similarly, if the data you pass to EvaluateAsync contains two consecutivemessages with the same ChatRole (for example, User or Assistant), it might alsoproduce a warning. However, even though an evaluator might produce a warningdiagnostic in these cases, it still proceeds with the evaluation.[TestMethod]public async Task SampleAndEvaluateResponse(){ // Create a with the scenario name // set to the fully qualified name of the current test method. await using ScenarioRun scenarioRun = await s_safetyReportingConfig.CreateScenarioRunAsync( this.ScenarioName, additionalTags: ["Sun"]); // Use the that's included in the // to get the LLM response. (IList messages, ChatResponse modelResponse) = await GetAstronomyConversationAsync( chatClient: scenarioRun.ChatConfiguration!.ChatClient, astronomyQuestion: "How far is the sun from Earth at " + "its closest and furthest points?"); // Run the evaluators configured in the // reporting configuration against the response. EvaluationResult result = await scenarioRun.EvaluateAsync( messages, modelResponse); // Run basic safety validation on the evaluation result. ValidateSafety(result);}Creates the ScenarioRun. The use of await using ensures that the ScenarioRun iscorrectly disposed and that the results of this evaluation are correctly persisted tothe result store.Gets the LLM's response to a specific astronomy question. The same IChatClient thatwill be used for evaluation is passed to the GetAstronomyConversationAsync methodin order to get response caching for the primary LLM response being evaluated. (Inaddition, this enables response caching for the responses that the evaluators fetchfrom the Azure AI Foundry Evaluation service as part of performing theirevaluations.)Runs the evaluators against the response. Like the LLM response, on subsequentruns, the evaluation is fetched from the (disk-based) response cache that wasconfigured in s_safetyReportingConfig.Runs some safety validation on the evaluation result.Run the test using your preferred test workflow, for example, by using the CLI commanddotnet test or through Test Explorer.To generate a report to view the evaluation results, see Generate a report.This tutorial covers the basics of evaluating content safety. As you create your test suite,consider the following next steps:Configure additional evaluators, such as the quality evaluators. For an example, see the AIsamples repo quality and safety evaluation example.Evaluate the content safety of generated images. For an example, see the AI samples repoimage response example.In real-world evaluations, you might not want to validate individual results, since the LLMresponses and evaluation scores can vary over time as your product (and the modelsused) evolve. You might not want individual evaluation tests to fail and block builds inyour CI/CD pipelines when this happens. Instead, in such cases, it might be better to relyon the generated report and track the overall trends for evaluation scores across differentscenarios over time (and only fail individual builds in your CI/CD pipelines when there's asignificant drop in evaluation scores across multiple different tests).Run the test/evaluationGenerate a reportNext stepsSample implementations of IChatClient andIEmbeddingGenerator06/23/2025.NET libraries that provide clients for language models and services can provideimplementations of the IChatClient and IEmbeddingGeneratorinterfaces. Any consumers of the interfaces are then able to interoperate seamlessly with thesemodels and services via the abstractions.The IChatClient interface defines a client abstraction responsible for interacting with AI servicesthat provide chat capabilities. It includes methods for sending and receiving messages withmulti-modal content (such as text, images, and audio), either as a complete set or streamedincrementally. Additionally, it allows for retrieving strongly typed services provided by the clientor its underlying services.The following sample implements IChatClient to show the general structure.C#The IChatClient interfaceusing System.Runtime.CompilerServices;using Microsoft.Extensions.AI;public sealed class SampleChatClient(Uri endpoint, string modelId) : IChatClient{ public ChatClientMetadata Metadata { get; } = new(nameof(SampleChatClient), endpoint, modelId); public async Task GetResponseAsync( IEnumerable chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default) { // Simulate some operation. await Task.Delay(300, cancellationToken); // Return a sample chat completion response randomly. string[] responses = [ "This is the first sample response.", "Here is another example of a response message.", "This is yet another response message." ];For more realistic, concrete implementations of IChatClient, see:AzureAIInferenceChatClient.csOpenAIChatClient.csMicrosoft.Extensions.AI chat clientsThe IEmbeddingGenerator interface represents a generic generator ofembeddings. Here, TInput is the type of input values being embedded, and TEmbedding is thetype of generated embedding, which inherits from the Embedding class.The Embedding class serves as a base class for embeddings generated by anIEmbeddingGenerator. It's designed to store and manage the metadata anddata associated with embeddings. Derived types, like Embedding, provide the concrete return new(new ChatMessage( ChatRole.Assistant, responses[Random.Shared.Next(responses.Length)] )); } public async IAsyncEnumerable GetStreamingResponseAsync( IEnumerable chatMessages, ChatOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) { // Simulate streaming by yielding messages one by one. string[] words = ["This ", "is ", "the ", "response ", "for ", "the ", "request."]; foreach (string word in words) { // Simulate some operation. await Task.Delay(100, cancellationToken); // Yield the next message in the response. yield return new ChatResponseUpdate(ChatRole.Assistant, word); } } public object? GetService(Type serviceType, object? serviceKey) => this; public TService? GetService(object? key = null) where TService : class => this as TService; void IDisposable.Dispose() { }}The IEmbeddingGeneratorinterfaceembedding vector data. For example, an Embedding exposes a ReadOnlyMemoryVector { get; } property for access to its embedding data.The IEmbeddingGenerator interface defines a method to asynchronouslygenerate embeddings for a collection of input values, with optional configuration andcancellation support. It also provides metadata describing the generator and allows for theretrieval of strongly typed services that can be provided by the generator or its underlyingservices.The following code shows how the SampleEmbeddingGenerator class implements theIEmbeddingGenerator interface. It has a primary constructor that accepts anendpoint and model ID, which are used to identify the generator. It also implements theGenerateAsync(IEnumerable, EmbeddingGenerationOptions, CancellationToken)method to generate embeddings for a collection of input values.C#using Microsoft.Extensions.AI;public sealed class SampleEmbeddingGenerator( Uri endpoint, string modelId) : IEmbeddingGenerator>{ private readonly EmbeddingGeneratorMetadata _metadata = new("SampleEmbeddingGenerator", endpoint, modelId); public async Task>> GenerateAsync( IEnumerable values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) { // Simulate some async operation. await Task.Delay(100, cancellationToken); // Create random embeddings. return [.. from value in values select new Embedding( Enumerable.Range(0, 384) .Select(_ => Random.Shared.NextSingle()).ToArray())]; } public object? GetService(Type serviceType, object? serviceKey) => serviceKey is not null ? null : serviceType == typeof(EmbeddingGeneratorMetadata) ? _metadata : serviceType?.IsInstanceOfType(this) is true ? this : null;This sample implementation just generates random embedding vectors. For a more realistic,concrete implementation, see OpenTelemetryEmbeddingGenerator.cs. void IDisposable.Dispose() { }}ChatClientBuilder ClassDefinitionNamespace:Microsoft.Extensions.AIAssembly:Microsoft.Extensions.AI.dllPackage:Microsoft.Extensions.AI v9.7.0Source:ChatClientBuilder.csA builder for creating pipelines of IChatClient.C#InheritanceObject→ChatClientBuilderConstructorsChatClientBuilder(Func)Initializes a new instance of the ChatClientBuilderclass.ChatClientBuilder(IChatClient)Initializes a new instance of the ChatClientBuilderclass.MethodsBuild(IServiceProvider)Builds an IChatClient that represents theentire pipeline. Calls to this instance willpass through each of the pipeline stages inturn.Use(Func)Adds a factory for an intermediate chatclient to the chat client pipeline.Use(Func)Adds a factory for an intermediate chatclient to the chat client pipeline.public sealed class ChatClientBuilderノExpand tableノExpand tableUse(Func,ChatOptions,Func,ChatOptions,CancellationToken,Task>,CancellationToken,Task>)Adds to the chat client pipeline ananonymous delegating chat client basedon a delegate that provides animplementation for bothGetResponseAsync(IEnumerable, ChatOptions, CancellationToken) andGetStreamingResponseAsync(IEnumerable, ChatOptions,CancellationToken).Use(Func,ChatOptions,IChatClient,CancellationToken, Task>,Func,ChatOptions, IChatClient,CancellationToken,IAsyncEnumerable>)Adds to the chat client pipeline ananonymous delegating chat client basedon a delegate that provides animplementation for bothGetResponseAsync(IEnumerable, ChatOptions, CancellationToken) andGetStreamingResponseAsync(IEnumerable, ChatOptions,CancellationToken).Extension MethodsConfigureOptions(ChatClientBuilder, Action)Adds a callback that configures a ChatOptions to bepassed to the next client in the pipeline.UseDistributedCache(ChatClientBuilder,IDistributedCache, Action)Adds a DistributedCachingChatClient as the nextstage in the pipeline.UseFunctionInvocation(ChatClientBuilder, ILoggerFactory, Action)Enables automatic function call invocation on thechat pipeline.UseLogging(ChatClientBuilder, ILoggerFactory,Action)Adds logging to the chat client pipeline.UseOpenTelemetry(ChatClientBuilder, ILoggerFactory, String, Action)Adds OpenTelemetry support to the chat clientpipeline, following the OpenTelemetry SemanticConventions for Generative AI systems.Applies toProductVersions.NET8 (package-provided), 9 (package-provided), 10 (package-provided)ノExpand tableProductVersions.NETFramework4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2(package-provided), 4.8 (package-provided).NET Standard2.0 (package-provided)IChatClient InterfaceDefinitionNamespace:Microsoft.Extensions.AIAssembly:Microsoft.Extensions.AI.Abstractions.dllPackage:Microsoft.Extensions.AI.Abstractions v9.7.0Source:IChatClient.csRepresents a chat client.C#DerivedMicrosoft.Extensions.AI.DelegatingChatClientMicrosoft.Extensions.AI.OllamaChatClientImplementsIDisposableRemarksApplications must consider risks such as prompt injection attacks, data sizes, and the numberof messages sent to the underlying provider or returned from it. Unless a specific IChatClientimplementation explicitly documents safeguards for these concerns, the application isexpected to implement appropriate protections.Unless otherwise specified, all members of IChatClient are thread-safe for concurrent use. It isexpected that all implementations of IChatClient support being used by multiple requestsconcurrently. Instances must not be disposed of while the instance is still in use.However, implementations of IChatClient might mutate the arguments supplied toGetResponseAsync(IEnumerable, ChatOptions, CancellationToken) andGetStreamingResponseAsync(IEnumerable, ChatOptions, CancellationToken),such as by configuring the options instance. Thus, consumers of the interface either shouldavoid using shared instances of these arguments for concurrent invocations or shouldotherwise ensure by construction that no IChatClient instances are used which might employsuch mutation. For example, the ConfigureOptions method is provided with a callback thatcould mutate the supplied options argument, and that should be avoided if using a singletonoptions instance.public interface IChatClient : IDisposableMethodsGetResponseAsync(IEnumerable, ChatOptions,CancellationToken)Sends chat messages and returns theresponse.GetService(Type, Object)Asks the IChatClient for an object ofthe specified type serviceType.GetStreamingResponseAsync(IEnumerable,ChatOptions, CancellationToken)Sends chat messages and streams theresponse.Extension MethodsAsBuilder(IChatClient)Creates a new ChatClientBuilder usinginnerClient as its inner client.GetRequiredService(IChatClient, Type, Object)Asks the IChatClient for an object of thespecified type serviceType and throwsan exception if one isn't available.GetRequiredService(IChatClient, Object)Asks the IChatClient for an object oftype TService and throws an exceptionif one isn't available.GetResponseAsync(IChatClient, ChatMessage, ChatOptions,CancellationToken)Sends a chat message and returns theresponse messages.GetResponseAsync(IChatClient, String, ChatOptions,CancellationToken)Sends a user chat text message andreturns the response messages.GetService(IChatClient, Object)Asks the IChatClient for an object oftype TService.GetStreamingResponseAsync(IChatClient, ChatMessage, ChatOptions, CancellationToken)Sends a chat message and streams theresponse messages.GetStreamingResponseAsync(IChatClient, String, ChatOptions,CancellationToken)Sends a user chat text message andstreams the response messages.GetResponseAsync(IChatClient, ChatMessage, ChatOptions, Nullable, CancellationToken)Sends a chat message, requesting aresponse matching the type T.ノExpand tableノExpand tableGetResponseAsync(IChatClient, ChatMessage, JsonSerializerOptions, ChatOptions, Nullable,CancellationToken)Sends a chat message, requesting aresponse matching the type T.GetResponseAsync(IChatClient, IEnumerable, ChatOptions, Nullable, CancellationToken)Sends chat messages, requesting aresponse matching the type T.GetResponseAsync(IChatClient, IEnumerable, JsonSerializerOptions, ChatOptions,Nullable, CancellationToken)Sends chat messages, requesting aresponse matching the type T.GetResponseAsync(IChatClient, String, ChatOptions,Nullable, CancellationToken)Sends a user chat text message,requesting a response matching thetype T.GetResponseAsync(IChatClient, String, JsonSerializerOptions, ChatOptions, Nullable, CancellationToken)Sends a user chat text message,requesting a response matching thetype T.Applies toProductVersions.NET8 (package-provided), 9 (package-provided), 10 (package-provided).NETFramework4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2(package-provided), 4.8 (package-provided).NET Standard2.0 (package-provided)See alsoBuild an AI chat app with .NET.The IChatClient interface.IEmbeddingGenerator InterfaceDefinitionNamespace:Microsoft.Extensions.AIAssembly:Microsoft.Extensions.AI.Abstractions.dllPackage:Microsoft.Extensions.AI.Abstractions v9.7.0Source:IEmbeddingGenerator.csRepresents a generator of embeddings.C#DerivedMicrosoft.Extensions.AI.DelegatingEmbeddingGeneratorMicrosoft.Extensions.AI.IEmbeddingGeneratorMicrosoft.Extensions.AI.OllamaEmbeddingGeneratorImplementsIDisposableRemarksThis base interface is used to allow for embedding generators to be stored in a non-genericmanner. To use the generator to create embeddings, instances typed as this base interface firstneed to be cast to the generic interface IEmbeddingGenerator.MethodsGetService(Type,Object)Asks the IEmbeddingGenerator for an object of thespecified type serviceType.Extension Methodspublic interface IEmbeddingGenerator : IDisposableノExpand tableノExpand tableGetRequiredService(IEmbeddingGenerator, Type, Object)Asks the IEmbeddingGenerator for anobject of the specified type serviceType and throws anexception if one isn't available.GetRequiredService(IEmbeddingGenerator, Object)Asks the IEmbeddingGenerator for anobject of type TService and throws an exception if one isn'tavailable.GetService(IEmbeddingGenerator, Object)Asks the IEmbeddingGenerator for anobject of type TService.Applies toProductVersions.NET8 (package-provided), 9 (package-provided), 10 (package-provided).NETFramework4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2(package-provided), 4.8 (package-provided).NET Standard2.0 (package-provided)Develop AI apps with .NET05/29/2025This article contains an organized list of the best learning resources for .NET developers whoare getting started building AI apps. Resources include popular quickstart articles, referencesamples, documentation, and training courses.Azure OpenAI Service provides REST API access to OpenAI's powerful language models. Thesemodels can be easily adapted to your specific task including but not limited to contentgeneration, summarization, image understanding, semantic search, and natural language tocode translation. Users can access the service through REST APIs, Azure OpenAI SDK for .NET,or via the Azure AI Foundry portal.LinkDescriptionAzure OpenAI SDKfor .NETThe GitHub source version of the Azure OpenAI client library for .NET is anadaptation of OpenAI's REST APIs that provides an idiomatic interface and richintegration with the rest of the Azure SDK ecosystem. It can connect to AzureOpenAI resources or to the non-Azure OpenAI inference endpoint, making it agreat choice for even non-Azure OpenAI development.Azure OpenAI SDKReleasesLinks to all Azure OpenAI SDK library packages, including links for .NET, Java,JavaScript and Go.Azure.AI.OpenAINuGet packageThe NuGet version of the Azure OpenAI client library for .NET.LinkDescription.NET OpenAI MCPAgentThis sample is an MCP agent app written in .NET, using Azure OpenAI, with aremote MCP server written in TypeScript.Resources for Azure OpenAI ServiceLibrariesノExpand tableSamplesノExpand tableLinkDescriptionAI Travel AgentsThe AI Travel Agents is a robust enterprise application that leverages multipleAI agents to enhance travel agency operations. The application demonstrateshow six AI agents collaborate to assist employees in handling customerqueries, providing destination recommendations, and planning itineraries.deepseek-dotnetThis is a sample chat demo that showcases the capabilities of DeepSeek-R1.Get started using GPT-35-Turbo and GPT-4An article that walks you through creating a chat completion sample.CompletionsA collection of 10 samples that demonstrate how to use the Azure OpenAIclient library for .NET to chat, stream replies, use your own data,transcribe/translate audio, generate images, etc.Streaming ChatCompletionsA deep link to the samples demonstrating streaming completions.OpenAI with MicrosoftEntra ID Role basedaccess controlA look at authentication using Microsoft Entra ID.OpenAI with ManagedIdentitiesAn article with more complex security scenarios that require Azure role-basedaccess control (Azure RBAC). This document covers how to authenticate to yourOpenAI resource using Microsoft Entra ID.More samplesA collection of OpenAI samples written in .NET.LinkDescriptionAzure OpenAI Service DocumentationThe hub page for Azure OpenAI Service documentation.Overview of the .NET + AI ecosystemSummary of the services and tools you might need to use inyour applications, with links to learn more about each of them.Build an Azure AI chat app with .NETUse Semantic Kernel or Azure OpenAI SDK to create a simple.NET 8 console chat application.Summarize text using Azure AI chatapp with .NETSimilar to the previous article, but the prompt is to summarizetext.Get insight about your data from an.NET Azure AI chat appUse Semantic Kernel or Azure OpenAI SDK to get analytics andinformation about your data.DocumentationノExpand tableLinkDescriptionExtend Azure AI using Tools andexecute a local Function with .NETCreate an assistant that handles certain prompts using customtools built in .NET.Generate images using Azure AI with.NETUse the OpenAI dell-e-3 model to generate an image.In addition to Azure OpenAI Service, there are many other Azure AI services that helpdevelopers and organizations rapidly create intelligent, market-ready, and responsibleapplications with out-of-the-box and prebuilt customizable APIs and models. Exampleapplications include natural language processing for conversations, search, monitoring,translation, speech, vision, and decision-making.LinkDescriptionIntegrate Speech into yourapps with Speech SDKSamplesA repo of samples for the Azure Cognitive Services Speech SDK. Links tosamples for speech recognition, translation, speech synthesis, and more.Azure AI DocumentIntelligence SDKAzure AI Document Intelligence (formerly Form Recognizer) is a cloudservice that uses machine learning to analyze text and structured data fromdocuments. The Document Intelligence software development kit (SDK) is aset of libraries and tools that enable you to easily integrate DocumentIntelligence models and capabilities into your applications.Extract structured datafrom forms, receipts,invoices, and cards usingForm Recognizer in .NETA repo of samples for the Azure.AI.FormRecognizer client library.Extract, classify, andunderstand text withindocuments using TextAnalytics in .NETThe client Library for Text Analytics. This is part of the Azure AI Languageservice, which provides Natural Language Processing (NLP) features forunderstanding and analyzing text.Document Translation in.NETA quickstart article that details how to use Document Translation totranslate a source document into a target language while preservingstructure and text formatting.Resources for other Azure AI servicesSamplesノExpand tableLinkDescriptionQuestion Answering in.NETA quickstart article to get an answer (and confidence score) from a body oftext that you send along with your question.Conversational LanguageUnderstanding in .NETThe client library for Conversational Language Understanding (CLU), acloud-based conversational AI service, which can extract intents and entitiesin conversations and acts like an orchestrator to select the best candidateto analyze conversations to get best response from apps like Qna, Luis, andConversation App.Analyze imagesSample code and setup documents for the Microsoft Azure AI ImageAnalysis SDKAI serviceDescriptionAPI referenceQuickstartContent SafetyAn AI service that detects unwanted content.Content Safety APIreferenceQuickstartDocumentIntelligenceTurn documents into intelligent data-drivensolutions.DocumentIntelligence APIreferenceQuickstartLanguageBuild apps with industry-leading natural languageunderstanding capabilities.Language APIreferenceQuickstartSearchBring AI-powered cloud search to yourapplications.Search API referenceQuickstartSpeechSpeech to text, text to speech, translation, andspeaker recognition.Speech APIreferenceQuickstartTranslatorUse AI-powered translation to translate more than100 in-use, at-risk and endangered languages anddialects.Translation APIreferenceQuickstartVisionAnalyze content in images and videos.Vision API referenceQuickstartDocumentationノExpand tableTrainingノExpand tableLinkDescriptionGenerative AI forBeginners WorkshopLearn the fundamentals of building Generative AI apps with our 18-lessoncomprehensive course by Microsoft Cloud Advocates.AI Agents for BeginnersWorkshopLearn the fundamentals of building Generative AI agents with our 10-lessoncomprehensive course by Microsoft Cloud Advocates.Get started with AzureAI ServicesAzure AI Services is a collection of services that are building blocks of AIfunctionality you can integrate into your applications. In this learning path,you'll learn how to provision, secure, monitor, and deploy Azure AI Servicesresources and use them to build intelligent solutions.Microsoft Azure AIFundamentals:Generative AITraining path to help you understand how large language models form thefoundation of generative AI: how Azure OpenAI Service provides access to thelatest generative AI technology, how prompts and responses can be fine-tunedand how Microsoft's responsible AI principles drive ethical AI advancements.Develop Generative AIsolutions with AzureOpenAI ServiceAzure OpenAI Service provides access to OpenAI's powerful large languagemodels such as ChatGPT, GPT, Codex, and Embeddings models. This learningpath teaches developers how to generate code, images, and text using theAzure OpenAI SDK and other Azure services.AI app templates provide you with well-maintained, easy to deploy reference implementationsthat provide a high-quality starting point for your AI apps.There are two categories of AI app templates, building blocks and end-to-end solutions.Building blocks are smaller-scale samples that focus on specific scenarios and tasks. End-to-end solutions are comprehensive reference samples including documentation, source code,and deployment to allow you to take and extend for your own purposes.To review a list of key templates available for each programming language, see AI apptemplates. To browse all available templates, see the AI app templates on the AI App Templategallery.AI app templates \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/reference-2-numeric-error.txt b/src/UglyToad.PdfPig.Tests/Integration/Documents/reference-2-numeric-error.txt new file mode 100644 index 000000000..9de1428c3 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/Documents/reference-2-numeric-error.txt @@ -0,0 +1 @@ +(Jl σ3 法海阔』咱国司被NA咿清峭阉且啊辛茹海耀表3-19车辆齿轮用钢系列牌号化学成分(质量分数)(%)国内牌号国外牌号c Si Mn p s Ni Cr Mo Al Cu Ti B 16CrMnTiH 0.13~0.18 0. \Kl -1. 20 20CrMnTiHI 20CrMnTiH2 。.80 -1. 10 1.00-1.30 20CrMnTiH3 0. 17 -0. 37军三0.0350. 04 -0. 10 0.18句0.2320CrMnTiH4 20CrMnTiH5 0. \Kl -1. 25 I.I。”1.4520CrMnTiH6 16MnCrH 16MnCr5 0. 14 -0. 20 I. 00~1.40 O.\KJ-1.20 20MnCrH 20MnCr5 0.17~0.23 1.10-1.50 1.00-1.30 0.02~ 罢王0.20运0.120.02~0.仍525MnCrH 25MnCr5 0.23~0.28 0.055 o. ro -o. so0. 80-1.10 28MnCrH 28MnCr5 0. 25 -0. 30 运0.15运0.1016CrMnBH ZF6 0. 13 -0. 18。.80-1.100.001 -18CrMnBH ZF7 0.15 -0. 40 1.00-1.30 0. 15 -0. 20军军aα丑。0. 015 -0. 035 1.00-1.30 0.α)317CrMnBH ZF7B 17Cr2Ni2H ZFI 0.15 -0.19 0.15 -0. 40 0.40~o.ro1.40~I. 70 1.40-1.70 16CrNiH 16CrNi4 0.13“0.18 0.02-0.04 0.15~0.35 0.70句1.100. 80-1. 200. 80~1.20 :;;;0.10 0.02-0. 05 19CrNiH 19CrNi5 0.16~0. 21 0. 02 -0. 035 17Cr2Ni2MoH ZFlA 0.15”0.19 0.15~0.40 o. 40 -o. ro0.015~0.035 I. 4。”I.70 1.50-1.80 0. 25 -0. 35 20CrNiMoHI 8620Hl 0.02-0.17”0.23 0.15町0.35o. ro -o. 95 0.017~0.032 0.35~0. 75 0.35”0.65 0. 15 -0. 25 20CrNiMoH2 8620田0.045 15CrMoH 0.13”0.18 0.25~0.45 0.17~0. 37 0.4。”0.70 髦。但50.8。”1.1020CrMo 0. 18 -0. 230.15 -0. 25 20CrMoH SCM420 0.17 -0. 23 0.17町0.350.55~0. \Kl 0.85句I.25 0.15”0.35 0.02-0.0击:;;;0.15 35CrMo 0. 32 -0. 40 0.40~0. 70 0.80斗100. 15 -0. 25 运0.03520CrH 0.17~0.37 0.70-1.00 运0.200.50~0.80 40Cr 0. 18 -0. 23 0.37~0.440. 80 -1.10 \ No newline at end of file diff --git a/src/UglyToad.PdfPig.Tests/Util/MurmurHash3Tests.cs b/src/UglyToad.PdfPig.Tests/Util/MurmurHash3Tests.cs new file mode 100644 index 000000000..370f87562 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Util/MurmurHash3Tests.cs @@ -0,0 +1,31 @@ +namespace UglyToad.PdfPig.Tests.Util +{ + using PdfPig.Util; + using System.Text; + + public class MurmurHash3Tests + { + public static object[][] MurmurHashData = new object[][] + { + // https://murmurhash.shorelabs.com/ + ["The quick brown fox jumps over the lazy dog", "2f1583c3ecee2c675d7bf66ce5e91d2c", "e34bbc7bbc071b6c7a433ca9c49a9347"], + ["MurmurHash3 was written by Austin Appleby, and is placed in the public", "6d3583489d9d1e5a898493af67e2ad10", "a91793d43f82cbabda2fb0c28c24799a"], + ["0", "0ab2409ea5eb34f8a5eb34f8a5eb34f8", "2ac9debed546a3803a8de9e53c875e09"], + }; + + [Theory] + [MemberData(nameof(MurmurHashData))] + public void x86x64Check(string sentence, string expectedX86, string expectedX64) + { + byte[] data = Encoding.UTF8.GetBytes(sentence); + + var hash = MurmurHash3.Compute_x86_128(data, data.Length, 0); + var actual = string.Concat(Array.ConvertAll(hash, x => x.ToString("x2"))); + Assert.Equal(expectedX86, actual); + + hash = MurmurHash3.Compute_x64_128(data, data.Length, 0); + actual = string.Concat(Array.ConvertAll(hash, x => x.ToString("x2"))); + Assert.Equal(expectedX64, actual); + } + } +} diff --git a/src/UglyToad.PdfPig/Parser/PdfDocumentFactory.cs b/src/UglyToad.PdfPig/Parser/PdfDocumentFactory.cs index 209a25701..654d6a72d 100644 --- a/src/UglyToad.PdfPig/Parser/PdfDocumentFactory.cs +++ b/src/UglyToad.PdfPig/Parser/PdfDocumentFactory.cs @@ -22,6 +22,7 @@ using PdfFonts.Parser.Parts; using Tokenization.Scanner; using Tokens; + using UglyToad.PdfPig.PdfFonts.Cmap; internal static class PdfDocumentFactory { @@ -166,22 +167,27 @@ private static PdfDocument OpenDocument( var encodingReader = new EncodingReader(pdfScanner); + var cmapCache = new CMapLocalCache(filterProvider, pdfScanner); + var type0Handler = new Type0FontHandler( cidFontFactory, - filterProvider, pdfScanner, + cmapCache, parsingOptions); var type1Handler = new Type1FontHandler( pdfScanner, filterProvider, encodingReader, + cmapCache, parsingOptions.UseLenientParsing); - var trueTypeHandler = new TrueTypeFontHandler(parsingOptions.Logger, + var trueTypeHandler = new TrueTypeFontHandler( + parsingOptions.Logger, pdfScanner, filterProvider, encodingReader, + cmapCache, SystemFontFinder.Instance, type1Handler); @@ -190,7 +196,7 @@ private static PdfDocument OpenDocument( type0Handler, trueTypeHandler, type1Handler, - new Type3FontHandler(pdfScanner, filterProvider, encodingReader)); + new Type3FontHandler(pdfScanner, encodingReader, cmapCache)); var resourceContainer = new ResourceStore(pdfScanner, fontFactory, filterProvider, parsingOptions); diff --git a/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs index 6432bf07a..01d088974 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs @@ -26,9 +26,7 @@ public static bool TryGet(string name, [NotNullWhen(true)] out CMap? result) if (CMapParser.TryParseExternal(name, out result)) { - Cache[name] = result; - return true; } @@ -43,9 +41,7 @@ public static CMap Parse(IInputBytes bytes) throw new ArgumentNullException(nameof(bytes)); } - var result = CMapParser.Parse(bytes); - - return result; + return CMapParser.Parse(bytes); } } } diff --git a/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapLocalCache.cs b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapLocalCache.cs new file mode 100644 index 000000000..023dcb0e4 --- /dev/null +++ b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapLocalCache.cs @@ -0,0 +1,115 @@ +namespace UglyToad.PdfPig.PdfFonts.Cmap +{ + using Core; + using Filters; + using System; + using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; + using System.Text; + using Tokenization.Scanner; + using Tokens; + using UglyToad.PdfPig.Util; + + /// + /// Provides a local (per document) cache for CMap objects, allowing efficient retrieval and storage of CMap instances based on + /// their names and unique identifiers. + /// + /// This class is designed to cache CMap objects to improve performance by avoiding redundant + /// parsing of CMap data. It uses a combination of CMap names and GUIDs derived from the CMap data to uniquely + /// identify and store CMap instances. + internal sealed class CMapLocalCache + { + private static ReadOnlySpan cmapNameTag => @"/CMapName "u8; + private readonly object cacheLock = new object(); + + private readonly Dictionary> _cache = new(); + private readonly ILookupFilterProvider _filterProvider; + private readonly IPdfTokenScanner _scanner; + + /// + /// Provides a local (per document) cache for CMap objects, allowing efficient retrieval and storage of CMap instances based on + /// their names and unique identifiers. + /// + /// This class is designed to cache CMap objects to improve performance by avoiding redundant + /// parsing of CMap data. It uses a combination of CMap names and GUIDs derived from the CMap data to uniquely + /// identify and store CMap instances. + public CMapLocalCache(ILookupFilterProvider filterProvider, IPdfTokenScanner scanner) + { + _filterProvider = filterProvider; + _scanner = scanner; + } + + public bool TryGet(string name, [NotNullWhen(true)] out CMap? result) + { + return CMapCache.TryGet(name, out result); + } + + private static Guid GetGuid(ReadOnlySpan bytes) + { + // Assumes MurmurHash3 is good enough for hashing CMap data to create unique identifiers, + // i.e. collisions should be extremely rare. + return new Guid(MurmurHash3.Compute_x64_128(bytes)); + } + + public bool TryGet(StreamToken token, [NotNullWhen(true)] out CMap? result) + { + if (token.Data.IsEmpty) + { + result = null; + return false; + } + + var decodedUnicodeCMap = token.Decode(_filterProvider, _scanner); + + if (!TryGetNameFast(decodedUnicodeCMap.Span, out string? cmapName)) + { + result = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); + return true; + } + + var guid = GetGuid(decodedUnicodeCMap.Span); + + lock (cacheLock) + { + if (!_cache.TryGetValue(cmapName!, out var cMaps)) + { + cMaps = new Dictionary(); + _cache[cmapName!] = cMaps; + } + + if (cMaps.TryGetValue(guid, out result)) + { + return true; + } + + result = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); + cMaps[guid] = result; + } + + return true; + } + + private static bool TryGetNameFast(ReadOnlySpan bytes, out string? name) + { + name = null; + int nameIndex = bytes.IndexOf(cmapNameTag); + + if (nameIndex <= -1) + { + return false; + } + + nameIndex += cmapNameTag.Length; + + int nameEndIndex = bytes.Slice(nameIndex).IndexOf("def"u8); + + if (nameEndIndex <= -1) + { + return false; + } + + name = Encoding.UTF8.GetString(bytes.Slice(nameIndex, nameEndIndex - 1)); + return true; + } + } +} diff --git a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs index f545e18ba..b24ab6f61 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs @@ -2,7 +2,6 @@ { using System; using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using Cmap; @@ -30,12 +29,14 @@ internal class TrueTypeFontHandler : IFontHandler private readonly IEncodingReader encodingReader; private readonly ISystemFontFinder systemFontFinder; private readonly IFontHandler type1FontHandler; + private readonly CMapLocalCache cmapLocalCache; public TrueTypeFontHandler( ILog log, IPdfTokenScanner pdfScanner, ILookupFilterProvider filterProvider, IEncodingReader encodingReader, + CMapLocalCache cmapLocalCache, ISystemFontFinder systemFontFinder, IFontHandler type1FontHandler) { @@ -45,6 +46,7 @@ public TrueTypeFontHandler( this.systemFontFinder = systemFontFinder; this.type1FontHandler = type1FontHandler; this.pdfScanner = pdfScanner; + this.cmapLocalCache = cmapLocalCache; } public IFont Generate(DictionaryToken dictionary) @@ -135,10 +137,9 @@ public IFont Generate(DictionaryToken dictionary) try { var toUnicode = DirectObjectFinder.Get(toUnicodeObj, pdfScanner); - - if (toUnicode?.Decode(filterProvider, pdfScanner) is { } decodedUnicodeCMap) + if (!cmapLocalCache.TryGet(toUnicode, out toUnicodeCMap)) { - toUnicodeCMap = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); + log.Error("Failed to decode ToUnicode CMap for a TrueType font in file."); } } catch (Exception ex) @@ -180,7 +181,7 @@ public IFont Generate(DictionaryToken dictionary) return new TrueTypeSimpleFont(name, descriptor, toUnicodeCMap, encoding, font, firstCharacter, widths); } - private TrueTypeFont? ParseTrueTypeFont(FontDescriptor descriptor, [NotNullWhen(true)] out IFontHandler? actualHandler) + private TrueTypeFont? ParseTrueTypeFont(FontDescriptor descriptor, out IFontHandler? actualHandler) { actualHandler = null; @@ -203,8 +204,6 @@ public IFont Generate(DictionaryToken dictionary) { var fontFileStream = DirectObjectFinder.Get(descriptor.FontFile.ObjectKey, pdfScanner); - var fontFile = fontFileStream.Decode(filterProvider, pdfScanner); - if (descriptor.FontFile.FileType == DescriptorFontFile.FontFileType.FromSubtype) { var shouldThrow = true; @@ -229,7 +228,8 @@ public IFont Generate(DictionaryToken dictionary) $"Expected a TrueType font in the TrueType font descriptor, instead it was {descriptor.FontFile.FileType}."); } } - + + var fontFile = fontFileStream.Decode(filterProvider, pdfScanner); var font = TrueTypeFontParser.Parse(new TrueTypeDataBytes(new MemoryInputBytes(fontFile))); return font; @@ -237,7 +237,6 @@ public IFont Generate(DictionaryToken dictionary) catch (Exception ex) { log.Error("Could not parse the TrueType font.", ex); - return null; } } diff --git a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs index 7fda8b854..c60f56326 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs @@ -5,8 +5,6 @@ using CidFonts; using Cmap; using Composite; - using Core; - using Filters; using Fonts; using Logging; using Parts; @@ -18,20 +16,20 @@ internal sealed class Type0FontHandler : IFontHandler { private readonly CidFontFactory cidFontFactory; - private readonly ILookupFilterProvider filterProvider; private readonly IPdfTokenScanner scanner; private readonly ILog logger; + private readonly CMapLocalCache cmapLocalCache; private readonly ParsingOptions parsingOptions; public Type0FontHandler( CidFontFactory cidFontFactory, - ILookupFilterProvider filterProvider, IPdfTokenScanner scanner, + CMapLocalCache cmapLocalCache, ParsingOptions parsingOptions) { this.cidFontFactory = cidFontFactory; - this.filterProvider = filterProvider; this.scanner = scanner; + this.cmapLocalCache = cmapLocalCache; logger = parsingOptions.Logger; this.parsingOptions = parsingOptions; } @@ -73,17 +71,12 @@ public IFont Generate(DictionaryToken dictionary) { var toUnicodeValue = dictionary.Data[NameToken.ToUnicode]; - if (DirectObjectFinder.TryGet(toUnicodeValue, scanner, out var toUnicodeStream)) - { - if (toUnicodeStream?.Decode(filterProvider, scanner) is { } decodedUnicodeCMap) - { - toUnicodeCMap = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); - } - } + if (DirectObjectFinder.TryGet(toUnicodeValue, scanner, out var toUnicodeStream) + && cmapLocalCache.TryGet(toUnicodeStream,out toUnicodeCMap)) + { } else if (DirectObjectFinder.TryGet(toUnicodeValue, scanner, out var toUnicodeName) - && CMapCache.TryGet(toUnicodeName.Data, out toUnicodeCMap)) - { - } + && cmapLocalCache.TryGet(toUnicodeName.Data, out toUnicodeCMap)) + { } else { // Rather than throwing here, let's try returning the font anyway since @@ -152,7 +145,7 @@ private CMap ReadEncoding(DictionaryToken dictionary, out bool isCMapPredefined) if (dictionary.TryGet(NameToken.Encoding, scanner, out NameToken? encodingName)) { - if (!CMapCache.TryGet(encodingName.Data, out var cmap)) + if (!cmapLocalCache.TryGet(encodingName.Data, out var cmap)) { throw new InvalidOperationException($"Missing CMap named {encodingName.Data}."); } @@ -163,11 +156,12 @@ private CMap ReadEncoding(DictionaryToken dictionary, out bool isCMapPredefined) } else if (dictionary.TryGet(NameToken.Encoding, scanner, out StreamToken? stream)) { - var decoded = stream.Decode(filterProvider, scanner); - - var cmap = CMapCache.Parse(new MemoryInputBytes(decoded)); + if (!cmapLocalCache.TryGet(stream, out var cmap)) + { + throw new InvalidOperationException($"Could not read CMap from stream in the dictionary: {dictionary}"); + } - result = cmap ?? throw new InvalidOperationException($"Could not read CMap from stream in the dictionary: {dictionary}"); + result = cmap; } else { @@ -199,7 +193,7 @@ private static (CMap?, bool isChineseJapaneseOrKorean) GetUcs2CMap(DictionaryTok var isChineseJapaneseOrKorean = false; - if (cidFont != null && string.Equals(cidFont.SystemInfo.Registry, "Adobe", StringComparison.OrdinalIgnoreCase)) + if (cidFont is not null && string.Equals(cidFont.SystemInfo.Registry, "Adobe", StringComparison.OrdinalIgnoreCase)) { isChineseJapaneseOrKorean = string.Equals(cidFont.SystemInfo.Ordering, "GB1", StringComparison.OrdinalIgnoreCase) || string.Equals(cidFont.SystemInfo.Ordering, "CNS1", StringComparison.OrdinalIgnoreCase) diff --git a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type1FontHandler.cs b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type1FontHandler.cs index 5cf1b7aa0..7b4d3df58 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type1FontHandler.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type1FontHandler.cs @@ -11,7 +11,6 @@ using Fonts.Type1.Parser; using PdfPig.Parser.Parts; using Simple; - using System; using Tokenization.Scanner; using Tokens; @@ -20,17 +19,20 @@ internal class Type1FontHandler : IFontHandler private readonly IPdfTokenScanner pdfScanner; private readonly ILookupFilterProvider filterProvider; private readonly IEncodingReader encodingReader; + private readonly CMapLocalCache cmapLocalCache; private readonly bool isLenientParsing; public Type1FontHandler( IPdfTokenScanner pdfScanner, ILookupFilterProvider filterProvider, IEncodingReader encodingReader, + CMapLocalCache cmapLocalCache, bool isLenientParsing) { this.pdfScanner = pdfScanner; this.filterProvider = filterProvider; this.encodingReader = encodingReader; + this.cmapLocalCache = cmapLocalCache; this.isLenientParsing = isLenientParsing; } @@ -80,7 +82,7 @@ public IFont Generate(DictionaryToken dictionary) { var metrics = Standard14.GetAdobeFontMetrics(baseFontToken.Data); - if (metrics == null) + if (metrics is null) { if (isLenientParsing) { @@ -112,19 +114,15 @@ public IFont Generate(DictionaryToken dictionary) { var toUnicode = DirectObjectFinder.Get(toUnicodeObj, pdfScanner); - if (toUnicode?.Decode(filterProvider, pdfScanner) is { } decodedUnicodeCMap) - { - toUnicodeCMap = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); - } + cmapLocalCache.TryGet(toUnicode, out toUnicodeCMap); } - var fromFont = default(Encoding); if (font != null) { if (font.TryGetFirst(out var t1Font)) { - fromFont = t1Font.Encoding != null ? new BuiltInEncoding(t1Font.Encoding) : default(Encoding); + fromFont = t1Font.Encoding is not null ? new BuiltInEncoding(t1Font.Encoding) : default(Encoding); } else if (font.TryGetSecond(out var cffFont)) { diff --git a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type3FontHandler.cs b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type3FontHandler.cs index 4fa102137..c62e168b7 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type3FontHandler.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type3FontHandler.cs @@ -2,28 +2,27 @@ { using Cmap; using Core; - using Filters; using Fonts; using Fonts.Encodings; using PdfPig.Parser.Parts; using Simple; - using System; using Tokenization.Scanner; using Tokens; using Util; internal class Type3FontHandler : IFontHandler { - private readonly ILookupFilterProvider filterProvider; private readonly IEncodingReader encodingReader; private readonly IPdfTokenScanner scanner; + private readonly CMapLocalCache cmapLocalCache; - public Type3FontHandler(IPdfTokenScanner scanner, ILookupFilterProvider filterProvider, - IEncodingReader encodingReader) + public Type3FontHandler(IPdfTokenScanner scanner, + IEncodingReader encodingReader, + CMapLocalCache cMapLocalCache) { - this.filterProvider = filterProvider; this.encodingReader = encodingReader; this.scanner = scanner; + this.cmapLocalCache = cMapLocalCache; } public IFont Generate(DictionaryToken dictionary) @@ -48,11 +47,7 @@ public IFont Generate(DictionaryToken dictionary) if (dictionary.TryGet(NameToken.ToUnicode, out var toUnicodeObj)) { var toUnicode = DirectObjectFinder.Get(toUnicodeObj, scanner); - - if (toUnicode?.Decode(filterProvider, scanner) is { } decodedUnicodeCMap) - { - toUnicodeCMap = CMapCache.Parse(new MemoryInputBytes(decodedUnicodeCMap)); - } + cmapLocalCache.TryGet(toUnicode, out toUnicodeCMap); } var name = GetFontName(dictionary); diff --git a/src/UglyToad.PdfPig/Util/MurmurHash3.cs b/src/UglyToad.PdfPig/Util/MurmurHash3.cs new file mode 100644 index 000000000..7c7d1dc37 --- /dev/null +++ b/src/UglyToad.PdfPig/Util/MurmurHash3.cs @@ -0,0 +1,436 @@ +namespace UglyToad.PdfPig.Util +{ + // Ported from c++ implementation at https://github.com/aappleby/smhasher/blob/0ff96f7835817a27d0487325b6c16033e2992eb5/src/MurmurHash3.cpp#L1 + // The code was ported with LLM assistance. + // + // The original license is included below. + + //----------------------------------------------------------------------------- + // MurmurHash3 was written by Austin Appleby, and is placed in the public + // domain. The author hereby disclaims copyright to this source code. + + // Note - The x86 and x64 versions do _not_ produce the same results, as the + // algorithms are optimized for their respective platforms. You can still + // compile and run any of them on any platform, but your performance with the + // non-native version will be less than optimal. + + using System; + using System.Buffers.Binary; + using System.Security.Cryptography; + + /// + /// MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. + /// + /// Note - The x86 and x64 versions do _not_ produce the same results, as the + /// algorithms are optimized for their respective platforms. You can still + /// compile and run any of them on any platform, but your performance with the + /// non-native version will be less than optimal. + /// + /// + internal static class MurmurHash3 + { + // From Wikipedia: + // MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. It was created + // by Austin Appleby in 2008 and, as of 8 January 2016, is hosted on GitHub along with its test suite named + // SMHasher. It also exists in a number of variants, all of which have been released into the public domain. + // The name comes from two basic operations, multiply (MU) and rotate (R), used in its inner loop. + // + // Unlike cryptographic hash functions, it is not specifically designed to be difficult to reverse by + // an adversary, making it unsuitable for cryptographic purposes. + + /// + /// MurmurHash3 128-bit x86 variant, returns hash as byte array (16 bytes). + /// + /// Note - The x86 and x64 versions do _not_ produce the same results, as the + /// algorithms are optimized for their respective platforms. You can still + /// compile and run any of them on any platform, but your performance with the + /// non-native version will be less than optimal. + /// + /// + public static byte[] Compute_x86_128(ReadOnlySpan data) + { + return Compute_x86_128(data, data.Length, 0); + } + + /// + /// MurmurHash3 128-bit x86 variant, returns hash as byte array (16 bytes). + /// + /// Note - The x86 and x64 versions do _not_ produce the same results, as the + /// algorithms are optimized for their respective platforms. You can still + /// compile and run any of them on any platform, but your performance with the + /// non-native version will be less than optimal. + /// + /// + public static byte[] Compute_x86_128(ReadOnlySpan data, int len, uint seed) + { + Span hash = stackalloc uint[4]; + Compute_x86_128(data, len, seed, hash); + +#if NET + byte[] result = GC.AllocateUninitializedArray(16); +#else + byte[] result = new byte[16]; +#endif + + var span = result.AsSpan(); + + Span buffer = stackalloc byte[4]; + GetBytes(buffer, hash[0]); + buffer.CopyTo(span.Slice(0, 4)); + + GetBytes(buffer, hash[1]); + buffer.CopyTo(span.Slice(4, 4)); + + GetBytes(buffer, hash[2]); + buffer.CopyTo(span.Slice(8, 4)); + + GetBytes(buffer, hash[3]); + buffer.CopyTo(span.Slice(12, 4)); + + return result; + } + + /// + /// MurmurHash3 128-bit x64 variant, returns hash as byte array (16 bytes). + /// + /// Note - The x86 and x64 versions do _not_ produce the same results, as the + /// algorithms are optimized for their respective platforms. You can still + /// compile and run any of them on any platform, but your performance with the + /// non-native version will be less than optimal. + /// + /// + public static byte[] Compute_x64_128(ReadOnlySpan data) + { + return Compute_x64_128(data, data.Length, 0); + } + + /// + /// MurmurHash3 128-bit x64 variant, returns hash as byte array (16 bytes). + /// + /// Note - The x86 and x64 versions do _not_ produce the same results, as the + /// algorithms are optimized for their respective platforms. You can still + /// compile and run any of them on any platform, but your performance with the + /// non-native version will be less than optimal. + /// + /// + public static byte[] Compute_x64_128(ReadOnlySpan data, int len, uint seed) + { + Span hash = stackalloc ulong[2]; + Compute_x64_128(data, len, seed, hash); + +#if NET + byte[] result = GC.AllocateUninitializedArray(16); +#else + byte[] result = new byte[16]; +#endif + + var span = result.AsSpan(); + + Span buffer = stackalloc byte[8]; + GetBytes(buffer, hash[0]); + buffer.CopyTo(span.Slice(0, 8)); + + GetBytes(buffer, hash[1]); + buffer.CopyTo(span.Slice(8, 8)); + + return result; + } + + private static void Compute_x86_128(ReadOnlySpan data, int len, uint seed, Span outHash) + { + const uint c1 = 0x239b961b, c2 = 0xab0e9789, c3 = 0x38b34ae5, c4 = 0xa1e38b93; + + uint h1 = seed, h2 = seed, h3 = seed, h4 = seed; + int nblocks = len / 16; + + // Body + for (int i = 0; i < nblocks; ++i) + { + int offset = i * 16; + + uint k1 = BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(offset)); + uint k2 = BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(offset + 4)); + uint k3 = BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(offset + 8)); + uint k4 = BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(offset + 12)); + + k1 *= c1; + k1 = Rotl32(k1, 15); + k1 *= c2; + h1 ^= k1; + h1 = Rotl32(h1, 19); + h1 += h2; + h1 = h1 * 5 + 0x561ccd1b; + + k2 *= c2; + k2 = Rotl32(k2, 16); + k2 *= c3; + h2 ^= k2; + h2 = Rotl32(h2, 17); + h2 += h3; + h2 = h2 * 5 + 0x0bcaa747; + + k3 *= c3; + k3 = Rotl32(k3, 17); + k3 *= c4; + h3 ^= k3; + h3 = Rotl32(h3, 15); + h3 += h4; + h3 = h3 * 5 + 0x96cd1c35; + + k4 *= c4; + k4 = Rotl32(k4, 18); + k4 *= c1; + h4 ^= k4; + h4 = Rotl32(h4, 13); + h4 += h1; + h4 = h4 * 5 + 0x32ac3b17; + } + + // Tail + int tailStart = nblocks * 16; + uint tk1 = 0, tk2 = 0, tk3 = 0, tk4 = 0; + switch (len & 15) + { + case 15: + tk4 ^= (uint)data[tailStart + 14] << 16; + goto case 14; + case 14: + tk4 ^= (uint)data[tailStart + 13] << 8; + goto case 13; + case 13: + tk4 ^= (uint)data[tailStart + 12]; + tk4 *= c4; + tk4 = Rotl32(tk4, 18); + tk4 *= c1; + h4 ^= tk4; + goto case 12; + case 12: + tk3 ^= (uint)data[tailStart + 11] << 24; + goto case 11; + case 11: + tk3 ^= (uint)data[tailStart + 10] << 16; + goto case 10; + case 10: + tk3 ^= (uint)data[tailStart + 9] << 8; + goto case 9; + case 9: + tk3 ^= (uint)data[tailStart + 8]; + tk3 *= c3; + tk3 = Rotl32(tk3, 17); + tk3 *= c4; + h3 ^= tk3; + goto case 8; + case 8: + tk2 ^= (uint)data[tailStart + 7] << 24; + goto case 7; + case 7: + tk2 ^= (uint)data[tailStart + 6] << 16; + goto case 6; + case 6: + tk2 ^= (uint)data[tailStart + 5] << 8; + goto case 5; + case 5: + tk2 ^= (uint)data[tailStart + 4]; + tk2 *= c2; + tk2 = Rotl32(tk2, 16); + tk2 *= c3; + h2 ^= tk2; + goto case 4; + case 4: + tk1 ^= (uint)data[tailStart + 3] << 24; + goto case 3; + case 3: + tk1 ^= (uint)data[tailStart + 2] << 16; + goto case 2; + case 2: + tk1 ^= (uint)data[tailStart + 1] << 8; + goto case 1; + case 1: + tk1 ^= (uint)data[tailStart]; + tk1 *= c1; + tk1 = Rotl32(tk1, 15); + tk1 *= c2; + h1 ^= tk1; + break; + } + + // Finalization + h1 ^= (uint)len; + h2 ^= (uint)len; + h3 ^= (uint)len; + h4 ^= (uint)len; + h1 += h2; + h1 += h3; + h1 += h4; + h2 += h1; + h3 += h1; + h4 += h1; + h1 = Fmix32(h1); + h2 = Fmix32(h2); + h3 = Fmix32(h3); + h4 = Fmix32(h4); + h1 += h2; + h1 += h3; + h1 += h4; + h2 += h1; + h3 += h1; + h4 += h1; + + outHash[0] = h1; + outHash[1] = h2; + outHash[2] = h3; + outHash[3] = h4; + } + + private static void Compute_x64_128(ReadOnlySpan data, int len, uint seed, Span outHash) + { + const ulong c1 = 0x87c37b91114253d5UL; + const ulong c2 = 0x4cf5ad432745937fUL; + + ulong h1 = seed, h2 = seed; + int nblocks = len / 16; + + // Body + for (int i = 0; i < nblocks; ++i) + { + int offset = i * 16; + ulong k1 = BinaryPrimitives.ReadUInt64LittleEndian(data.Slice(offset)); + ulong k2 = BinaryPrimitives.ReadUInt64LittleEndian(data.Slice(offset + 8)); + + k1 *= c1; + k1 = Rotl64(k1, 31); + k1 *= c2; + h1 ^= k1; + h1 = Rotl64(h1, 27); + h1 += h2; + h1 = h1 * 5 + 0x52dce729; + + k2 *= c2; + k2 = Rotl64(k2, 33); + k2 *= c1; + h2 ^= k2; + h2 = Rotl64(h2, 31); + h2 += h1; + h2 = h2 * 5 + 0x38495ab5; + } + + // Tail + int tailStart = nblocks * 16; + ulong tk1 = 0, tk2 = 0; + switch (len & 15) + { + case 15: + tk2 ^= ((ulong)data[tailStart + 14]) << 48; + goto case 14; + case 14: + tk2 ^= ((ulong)data[tailStart + 13]) << 40; + goto case 13; + case 13: + tk2 ^= ((ulong)data[tailStart + 12]) << 32; + goto case 12; + case 12: + tk2 ^= ((ulong)data[tailStart + 11]) << 24; + goto case 11; + case 11: + tk2 ^= ((ulong)data[tailStart + 10]) << 16; + goto case 10; + case 10: + tk2 ^= ((ulong)data[tailStart + 9]) << 8; + goto case 9; + case 9: + tk2 ^= ((ulong)data[tailStart + 8]); + tk2 *= c2; + tk2 = Rotl64(tk2, 33); + tk2 *= c1; + h2 ^= tk2; + goto case 8; + case 8: + tk1 ^= ((ulong)data[tailStart + 7]) << 56; + goto case 7; + case 7: + tk1 ^= ((ulong)data[tailStart + 6]) << 48; + goto case 6; + case 6: + tk1 ^= ((ulong)data[tailStart + 5]) << 40; + goto case 5; + case 5: + tk1 ^= ((ulong)data[tailStart + 4]) << 32; + goto case 4; + case 4: + tk1 ^= ((ulong)data[tailStart + 3]) << 24; + goto case 3; + case 3: + tk1 ^= ((ulong)data[tailStart + 2]) << 16; + goto case 2; + case 2: + tk1 ^= ((ulong)data[tailStart + 1]) << 8; + goto case 1; + case 1: + tk1 ^= ((ulong)data[tailStart + 0]); + tk1 *= c1; + tk1 = Rotl64(tk1, 31); + tk1 *= c2; + h1 ^= tk1; + break; + } + + // Finalization + h1 ^= (ulong)len; + h2 ^= (ulong)len; + h1 += h2; + h2 += h1; + h1 = Fmix64(h1); + h2 = Fmix64(h2); + h1 += h2; + h2 += h1; + outHash[0] = h1; + outHash[1] = h2; + } + + // ---- Utility functions and mixing ---- + + private static uint Rotl32(uint x, int r) => (x << r) | (x >> (32 - r)); + + private static ulong Rotl64(ulong x, int r) => (x << r) | (x >> (64 - r)); + + private static uint Fmix32(uint h) + { + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + return h; + } + + private static ulong Fmix64(ulong k) + { + k ^= k >> 33; + k *= 0xff51afd7ed558ccdUL; + k ^= k >> 33; + k *= 0xc4ceb9fe1a85ec53UL; + k ^= k >> 33; + return k; + } + + private static void GetBytes(Span buffer, ulong v) + { + if (BitConverter.IsLittleEndian) + { + v = BinaryPrimitives.ReverseEndianness(v); + } + + BinaryPrimitives.WriteUInt64LittleEndian(buffer, v); + } + + private static void GetBytes(Span buffer, uint v) + { + if (BitConverter.IsLittleEndian) + { + v = BinaryPrimitives.ReverseEndianness(v); + } + + BinaryPrimitives.WriteUInt32LittleEndian(buffer, v); + } + } +}