diff --git a/.gitattributes b/.gitattributes index 688b1627f1012c11e2040b3cde330161f3eaf805..1e4caf055e26e510df74e0e855e234f4810a71bf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -290,131 +290,3 @@ literature_pdfs/Self-sensing[[:space:]]performance[[:space:]]of[[:space:]]cement literature_pdfs/Self‐Sensing[[:space:]]Cementitious[[:space:]]Composites[[:space:]]with[[:space:]]Hierarchical[[:space:]]Carbon[[:space:]]Fiber‐Carbon[[:space:]]Nanotube[[:space:]]Composite[[:space:]]Fillers.pdf filter=lfs diff=lfs merge=lfs -text literature_pdfs/Silane[[:space:]]treatment[[:space:]]of[[:space:]]bagasse[[:space:]]fiber[[:space:]]for[[:space:]]reinforcement[[:space:]]of[[:space:]]cementitious[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text literature_pdfs/The[[:space:]]effect[[:space:]]of[[:space:]]silane[[:space:]]surface[[:space:]]treatment[[:space:]]on[[:space:]]the[[:space:]]mechanical[[:space:]]properties[[:space:]]of[[:space:]]UHPFRC.pdf filter=lfs diff=lfs merge=lfs -text -papers/1-s2.0-S095006181732278X-main.pdf filter=lfs diff=lfs merge=lfs -text -papers/1-s2.0-S0950061820330786-main.pdf filter=lfs diff=lfs merge=lfs -text -papers/1-s2.0-S1359836816316882-main.pdf filter=lfs diff=lfs merge=lfs -text -papers/1-s2.0-S2090447920301593-main.pdf filter=lfs diff=lfs merge=lfs -text -papers/2011-EffectofSpecimenSizeonStaticStrengthandDIFofHSCfromSHPBTest.pdf filter=lfs diff=lfs merge=lfs -text -papers/document.pdf filter=lfs diff=lfs merge=lfs -text -papers/Capacitance-based[[:space:]]stress[[:space:]]self-sensing[[:space:]]in[[:space:]]cement[[:space:]]paste[[:space:]]without[[:space:]]requiring[[:space:]]any[[:space:]]admixture.pdf filter=lfs diff=lfs merge=lfs -text -papers/Capacitive[[:space:]]compressive[[:space:]]stress[[:space:]]self-sensing[[:space:]]behavior[[:space:]]of[[:space:]]cement[[:space:]]mortar[[:space:]]and[[:space:]]its[[:space:]]dependence[[:space:]]on[[:space:]]the[[:space:]]thickness.pdf filter=lfs diff=lfs merge=lfs -text -papers/Development[[:space:]]of[[:space:]]self-sensing[[:space:]]ultra-high-performance[[:space:]]concrete[[:space:]]using[[:space:]]hybrid[[:space:]]carbon[[:space:]]black[[:space:]]and[[:space:]]carbon[[:space:]]nanofibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/Development[[:space:]]of[[:space:]]sensing[[:space:]]concrete[[:space:]]Principles,[[:space:]]properties[[:space:]]and[[:space:]]its[[:space:]]applications.pdf filter=lfs diff=lfs merge=lfs -text -papers/Effect[[:space:]]of[[:space:]]silane[[:space:]]treatment[[:space:]]on[[:space:]]microstructure[[:space:]]of[[:space:]]sisal[[:space:]]fibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/EVALUA~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/Graphene[[:space:]]family[[:space:]](GFMs),[[:space:]]carbon[[:space:]]nanotubes[[:space:]](CNTs)[[:space:]]and[[:space:]]carbon[[:space:]]black[[:space:]](CB)[[:space:]]on[[:space:]]smart[[:space:]]materials[[:space:]]for[[:space:]]civil[[:space:]]construction.pdf filter=lfs diff=lfs merge=lfs -text -papers/Influence[[:space:]]of[[:space:]]the[[:space:]]structures[[:space:]]of[[:space:]]polycarboxylate[[:space:]]superplasticizer[[:space:]]on[[:space:]]its[[:space:]]performance[[:space:]]in[[:space:]]cement-based[[:space:]]materials-A[[:space:]]review.pdf filter=lfs diff=lfs merge=lfs -text -papers/Investigating[[:space:]]the[[:space:]]synergistic[[:space:]]effects[[:space:]]of[[:space:]]carbon[[:space:]]fiber[[:space:]]and[[:space:]]silica[[:space:]]fume[[:space:]]on[[:space:]]concrete[[:space:]]strength[[:space:]]and[[:space:]]eco-efficiency.pdf filter=lfs diff=lfs merge=lfs -text -papers/Investigation[[:space:]]of[[:space:]]3D[[:space:]]Printed[[:space:]]Self-Sensing[[:space:]]UHPC[[:space:]]Composites[[:space:]]Using[[:space:]]Graphite[[:space:]]and[[:space:]]Hybrid[[:space:]]Carbon[[:space:]]Microfibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/Ozone[[:space:]]treatment[[:space:]]of[[:space:]]carbon[[:space:]]fiber[[:space:]]for[[:space:]]reinforcing[[:space:]]cement.pdf filter=lfs diff=lfs merge=lfs -text -papers/Performance[[:space:]]of[[:space:]]silica[[:space:]]fume[[:space:]]slurry[[:space:]]treated[[:space:]]recycled[[:space:]]aggregate[[:space:]]concrete[[:space:]]reinforced[[:space:]]with[[:space:]]carbon[[:space:]]fibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/PIEZOE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/Piezopermittivity[[:space:]]for[[:space:]]capacitance-based[[:space:]]strain[[:space:]]stress[[:space:]]sensing.pdf filter=lfs diff=lfs merge=lfs -text -papers/Review[[:space:]]Improving[[:space:]]cement-based[[:space:]]materials[[:space:]]by[[:space:]]using[[:space:]]silica[[:space:]]fume.pdf filter=lfs diff=lfs merge=lfs -text -papers/Revolutionizing[[:space:]]infrastructure[[:space:]]The[[:space:]]evolving[[:space:]]landscape[[:space:]]of[[:space:]]electricity-based[[:space:]]multifunctional[[:space:]]concrete[[:space:]]from[[:space:]]concept[[:space:]]to[[:space:]]practice.pdf filter=lfs diff=lfs merge=lfs -text -papers/S1-An-experimental-study-of-self-sensing-concrete-enhanced_2020_Construction-an.pdf filter=lfs diff=lfs merge=lfs -text -papers/S10-Enhancing-self-stress-sensing-ability-of-smart-ultra-high_2021_Journal-of-Bu.pdf filter=lfs diff=lfs merge=lfs -text -papers/S100-C~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S11-Environment-Friendly,[[:space:]]Self-Sensing[[:space:]]Concrete[[:space:]]Blended[[:space:]]with[[:space:]]Byproduct[[:space:]]Wastes.pdf filter=lfs diff=lfs merge=lfs -text -papers/S12-Hybrid-effects-of-steel-fiber-and-carbon-nanotube-on-s_2018_Construction-and.pdf filter=lfs diff=lfs merge=lfs -text -papers/S13-Increasing-self-sensing-capability-of-carbon-nanotubes-c_2020_Construction-a.pdf filter=lfs diff=lfs merge=lfs -text -papers/S14-Influence-of-carbon-nanofiber-content-and-sodium-chloride-_2019_Case-Studies.pdf filter=lfs diff=lfs merge=lfs -text -papers/S15-Influence-of-water-ingress-on-the-electrical-properties-_2021_Journal-of-Bui.pdf filter=lfs diff=lfs merge=lfs -text -papers/S16-Investigations-on-scalable-fabrication-procedures-for-sel_2016_Cement-and-Co.pdf filter=lfs diff=lfs merge=lfs -text -papers/S17-Cross[[:space:]]tension[[:space:]]and[[:space:]]compression[[:space:]]loading[[:space:]]and[[:space:]]large-scale[[:space:]]testing[[:space:]]of[[:space:]]strain[[:space:]]and[[:space:]]damage[[:space:]]sensing[[:space:]]smart[[:space:]]concrete.pdf filter=lfs diff=lfs merge=lfs -text -papers/S18-Nano[[:space:]]graphite[[:space:]]platelets-enabled[[:space:]]piezoresistive[[:space:]]cementitious[[:space:]]composites[[:space:]]for[[:space:]]structural[[:space:]]health[[:space:]]monitoring.pdf filter=lfs diff=lfs merge=lfs -text -papers/S19-Self-sensing-piezoresistive-cement-composite-loaded_2017_Cement-and-Concrete.pdf filter=lfs diff=lfs merge=lfs -text -papers/S2-Characterization-of-smart-brass-fiber-reinforced-co_2020_Construction-and-Bu.pdf filter=lfs diff=lfs merge=lfs -text -papers/S20-IN~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S21-Mechanical,[[:space:]]electrical[[:space:]]and[[:space:]]self-sensing[[:space:]]properties[[:space:]]of[[:space:]]cementitious[[:space:]]mortars[[:space:]]containing[[:space:]]short[[:space:]]carbon[[:space:]]fibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S22-Improved[[:space:]]strain[[:space:]]sensing[[:space:]]properties[[:space:]]of[[:space:]]cement-based[[:space:]]sensors[[:space:]]through[[:space:]]enhanced[[:space:]]carbon[[:space:]]nanotube[[:space:]]dispersion.pdf filter=lfs diff=lfs merge=lfs -text -papers/S23-Increasing[[:space:]]self-sensing[[:space:]]capability[[:space:]]of[[:space:]]carbon[[:space:]]nanotubes[[:space:]]cement-based[[:space:]]materials[[:space:]]by[[:space:]]simultaneous[[:space:]]addition[[:space:]]of[[:space:]]Ni[[:space:]]nanofibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S24-Multifunctional-self-sensing-and-ductile-cementit_2019_Cement-and-Concrete-R.pdf filter=lfs diff=lfs merge=lfs -text -papers/S25-Self-sensing-capability-of-ultra-high-performance-concr_2018_Sensors-and-Act.pdf filter=lfs diff=lfs merge=lfs -text -papers/S26-TE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S27-Effect[[:space:]]of[[:space:]]aspect[[:space:]]ratio[[:space:]]on[[:space:]]strain[[:space:]]sensing[[:space:]]capacity[[:space:]]of[[:space:]]carbon[[:space:]]fiber[[:space:]]reinforced[[:space:]]cement[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S28-Smart[[:space:]]Graphite–Cement[[:space:]]Composites[[:space:]]with[[:space:]]Low[[:space:]]Percolation[[:space:]]Threshold.pdf filter=lfs diff=lfs merge=lfs -text -papers/S29-Hybrid[[:space:]]Carbon[[:space:]]Microfibers-Graphite[[:space:]]Fillers[[:space:]]for[[:space:]]Piezoresistive[[:space:]]Cementitious[[:space:]]Composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S3-Effect[[:space:]]of[[:space:]]characteristics[[:space:]]of[[:space:]]assembly[[:space:]]unit[[:space:]]of[[:space:]]CNTNCB[[:space:]]composite[[:space:]]fillers[[:space:]]on[[:space:]]properties[[:space:]]of[[:space:]]smart[[:space:]]cement-based[[:space:]]materials.pdf filter=lfs diff=lfs merge=lfs -text -papers/S30-Smart[[:space:]]Graphite–Cement[[:space:]]Composite[[:space:]]for[[:space:]]Roadway-Integrated[[:space:]]Weigh-In-Motion[[:space:]]Sensing.pdf filter=lfs diff=lfs merge=lfs -text -papers/S31-Electrical[[:space:]]and[[:space:]]piezoresistive[[:space:]]properties[[:space:]]of[[:space:]]carbon[[:space:]]nanofiber[[:space:]]cement[[:space:]]mortar[[:space:]]under[[:space:]]different[[:space:]]temperatures[[:space:]]and[[:space:]]water[[:space:]]contents.pdf filter=lfs diff=lfs merge=lfs -text -papers/S32-Self-stress-sensing-smart-concrete-containing-fine-stee_2019_Construction-an.pdf filter=lfs diff=lfs merge=lfs -text -papers/S33-IN~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S34-Self-sensing-ultra-high-performance-concrete-fo_2021_Sensors-and-Actuators-A.pdf filter=lfs diff=lfs merge=lfs -text -papers/S35-EL~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S36-Piezoresistivity[[:space:]]enhancement[[:space:]]of[[:space:]]functional[[:space:]]carbon[[:space:]]black[[:space:]]filled[[:space:]]cement-based[[:space:]]sensor[[:space:]]using[[:space:]]polypropylene[[:space:]]fibre.pdf filter=lfs diff=lfs merge=lfs -text -papers/S37-Test[[:space:]]and[[:space:]]Study[[:space:]]on[[:space:]]Electrical[[:space:]]Property[[:space:]]of[[:space:]]Conductive[[:space:]]Concrete.pdf filter=lfs diff=lfs merge=lfs -text -papers/S38[[:space:]]-[[:space:]]Electrical-resistance-based[[:space:]]Sensing[[:space:]]of[[:space:]]Impact[[:space:]][[:space:]]Damage[[:space:]]in[[:space:]]Carbon[[:space:]]Fiber[[:space:]]Reinforced[[:space:]]Cement-based[[:space:]]Materials.pdf filter=lfs diff=lfs merge=lfs -text -papers/S39[[:space:]]-[[:space:]]Electrical[[:space:]]conductivity[[:space:]]of[[:space:]]self-monitoring[[:space:]]CFRC.pdf filter=lfs diff=lfs merge=lfs -text -papers/S4-Effect-of-steel-fiber-and-carbon-black-on-the-self-s_2019_Construction-and-B.pdf filter=lfs diff=lfs merge=lfs -text -papers/S40[[:space:]]-[[:space:]]Resistance[[:space:]]Changes[[:space:]]during[[:space:]]Compression[[:space:]]of[[:space:]]Carbon[[:space:]]Fiber[[:space:]]Cement[[:space:]]COmposites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S41[[:space:]]-[[:space:]]Electrical-resistance-based[[:space:]]damage[[:space:]]self-sensing[[:space:]]in[[:space:]]carbon[[:space:]]fiber[[:space:]]reinforced[[:space:]]cement.pdf filter=lfs diff=lfs merge=lfs -text -papers/S42-SE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S43[[:space:]]-[[:space:]]the[[:space:]]100th[[:space:]]anniversary[[:space:]]of[[:space:]]the[[:space:]]four-point[[:space:]]probe[[:space:]]technique[[:space:]]the[[:space:]]role[[:space:]]of[[:space:]]probe[[:space:]]geometries[[:space:]]in[[:space:]]isotropic[[:space:]]andanisotropic[[:space:]]systems.pdf filter=lfs diff=lfs merge=lfs -text -papers/S44-Sensing[[:space:]]performance[[:space:]]of[[:space:]]engineered[[:space:]]cementitious[[:space:]]composites[[:space:]]in[[:space:]]different[[:space:]]application[[:space:]]forms.pdf filter=lfs diff=lfs merge=lfs -text -papers/S45-Insitu[[:space:]]synthesizing[[:space:]]carbon[[:space:]]nanotubes[[:space:]]on[[:space:]]cement[[:space:]]to[[:space:]]develop[[:space:]]self-sensing[[:space:]]cementitious[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S46-SE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S47-The[[:space:]]applicability[[:space:]]of[[:space:]]shungite[[:space:]]as[[:space:]]an[[:space:]]electrically[[:space:]]conductive[[:space:]]additive[[:space:]]in[[:space:]]cement[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S48-Self-sensing[[:space:]]properties[[:space:]]and[[:space:]]piezoresistive[[:space:]]effect[[:space:]]of[[:space:]]high[[:space:]]ductility[[:space:]]cementitious[[:space:]]composite.pdf filter=lfs diff=lfs merge=lfs -text -papers/S49-ME~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S5-Effects-of-carbon-nanomaterial-type-and-amount-on-self-sensing-_2019_Measure.pdf filter=lfs diff=lfs merge=lfs -text -papers/S50-IM~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S51-Electrical[[:space:]]and[[:space:]]piezoresistive[[:space:]]properties[[:space:]]of[[:space:]]cement[[:space:]]composites[[:space:]]with[[:space:]]carbon[[:space:]]nanomaterials.pdf filter=lfs diff=lfs merge=lfs -text -papers/S52-Influences[[:space:]]of[[:space:]](MCNT)[[:space:]]fraction,[[:space:]]moisture,[[:space:]]stressstrain[[:space:]]level[[:space:]]on[[:space:]]the[[:space:]]electrical[[:space:]]properties[[:space:]]of[[:space:]]MCNT[[:space:]]of[[:space:]]cement-based[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S53-CA~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S54-Carbon[[:space:]]Nanofibers[[:space:]]Grown[[:space:]]in[[:space:]]CaO[[:space:]]for[[:space:]]Self-Sensing[[:space:]]in[[:space:]]Mortar.pdf filter=lfs diff=lfs merge=lfs -text -papers/S55-Electro-mechanical[[:space:]]self-sensing[[:space:]]response[[:space:]]of[[:space:]]ultra-high-performance[[:space:]]fiber-reinforced[[:space:]]concrete[[:space:]]in[[:space:]]tension.pdf filter=lfs diff=lfs merge=lfs -text -papers/S55-Nanocarbon[[:space:]]black-based[[:space:]]ultra-high-performance[[:space:]]concrete[[:space:]](UHPC)[[:space:]]with[[:space:]]self-strain[[:space:]]sensing[[:space:]]capability.pdf filter=lfs diff=lfs merge=lfs -text -papers/S56-Self-sensing[[:space:]]cementitious[[:space:]]composites[[:space:]]incorporated[[:space:]]with[[:space:]]botryoid[[:space:]]hybrid[[:space:]]nano-carbon[[:space:]]materials[[:space:]]for[[:space:]]smart[[:space:]]infrastructures.pdf filter=lfs diff=lfs merge=lfs -text -papers/S57-IN~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S58-DE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S59-Modifying[[:space:]]self-sensing[[:space:]]cement-based[[:space:]]composites[[:space:]]through[[:space:]]multiscale[[:space:]]composition.pdf filter=lfs diff=lfs merge=lfs -text -papers/S6-Electrically[[:space:]]conductive[[:space:]]behaviors[[:space:]]and[[:space:]]mechanisms[[:space:]]of[[:space:]]short-cut[[:space:]]super-fine[[:space:]]stainless[[:space:]]wire[[:space:]]reinforced[[:space:]]reactive[[:space:]]powder[[:space:]]concrete.pdf filter=lfs diff=lfs merge=lfs -text -papers/S60-Study[[:space:]]on[[:space:]]self-sensing[[:space:]]capabilities[[:space:]]of[[:space:]]smart[[:space:]]cements[[:space:]]filled[[:space:]]with[[:space:]]graphene[[:space:]]oxide[[:space:]]under[[:space:]]dynamic[[:space:]]cyclic[[:space:]]loading.pdf filter=lfs diff=lfs merge=lfs -text -papers/S61-Piezoresistivity,[[:space:]]mechanisms[[:space:]]and[[:space:]]model[[:space:]]of[[:space:]]cement-based[[:space:]]materials[[:space:]]with[[:space:]]CNT_NCB[[:space:]]composite[[:space:]]fillers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S62-MU~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S63-Piezoresistive[[:space:]]properties[[:space:]]of[[:space:]]cement[[:space:]]composites[[:space:]]with[[:space:]]expanded[[:space:]]graphite.pdf filter=lfs diff=lfs merge=lfs -text -papers/S64-Electrical[[:space:]]Properties[[:space:]]of[[:space:]]Cement-Based[[:space:]]Composites[[:space:]]with[[:space:]]Carbon[[:space:]]Nanotubes,[[:space:]]Graphene,[[:space:]]and[[:space:]]Graphite[[:space:]]Nanofibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S65-AN~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S66-Experimental[[:space:]]Investigation[[:space:]]of[[:space:]]the[[:space:]]Piezoresistive[[:space:]]Properties[[:space:]]of[[:space:]]Cement[[:space:]]Composites[[:space:]]with[[:space:]]Hybrid[[:space:]]Carbon[[:space:]]Fibers[[:space:]]and[[:space:]]Nanotubes.pdf filter=lfs diff=lfs merge=lfs -text -papers/S67-Strain[[:space:]]and[[:space:]]damage[[:space:]]sensing[[:space:]]properties[[:space:]]on[[:space:]]multifunctional[[:space:]]cement[[:space:]]composites[[:space:]]with[[:space:]]CNF[[:space:]]admixture.pdf filter=lfs diff=lfs merge=lfs -text -papers/S68-EF~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S69-Cement-based[[:space:]]sensors[[:space:]]with[[:space:]]carbon[[:space:]]fibers[[:space:]]and[[:space:]]carbon[[:space:]]nanotubes[[:space:]]for[[:space:]]piezoresistive[[:space:]]sensing.pdf filter=lfs diff=lfs merge=lfs -text -papers/S7-Electrical[[:space:]]characteristics[[:space:]]and[[:space:]]pressure-sensitive[[:space:]]response[[:space:]]measurements[[:space:]]of[[:space:]]carboxyl[[:space:]]MWNT_cement[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S70-EV~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S71-Enhanced[[:space:]]sensing[[:space:]]performance[[:space:]]of[[:space:]]cement-based[[:space:]]composites[[:space:]]achieved[[:space:]]via[[:space:]]magnetically[[:space:]]aligned[[:space:]]nickel[[:space:]]particle[[:space:]]network.pdf filter=lfs diff=lfs merge=lfs -text -papers/S72-Anisotropic[[:space:]]electrical[[:space:]]and[[:space:]]piezoresistive[[:space:]]sensing[[:space:]]properties[[:space:]]of[[:space:]]cement-based[[:space:]]sensors[[:space:]]with[[:space:]]aligned[[:space:]]carbon[[:space:]]fibers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S73-Development[[:space:]]of[[:space:]]self-sensing[[:space:]]cement-based[[:space:]]sensor[[:space:]]using[[:space:]]recycled[[:space:]]fine[[:space:]]waste[[:space:]]glass[[:space:]]aggregates[[:space:]]coated[[:space:]]with[[:space:]]carbon[[:space:]]nanotube.pdf filter=lfs diff=lfs merge=lfs -text -papers/S74-Strain[[:space:]]sensitivity[[:space:]]of[[:space:]]steel-fiber-reinforced[[:space:]]industrial[[:space:]]smart[[:space:]]concrete.pdf filter=lfs diff=lfs merge=lfs -text -papers/S75-SE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S76-Strain-sensing[[:space:]]characteristics[[:space:]]of[[:space:]]self-consolidating[[:space:]]concrete[[:space:]]with[[:space:]]micro-carbon[[:space:]]fibre.pdf filter=lfs diff=lfs merge=lfs -text -papers/S77-SE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S78-Mechanical[[:space:]]and[[:space:]]self-sensing[[:space:]]properties[[:space:]]of[[:space:]]concrete[[:space:]]reinforced[[:space:]]with[[:space:]]carbon[[:space:]]nanofibres.pdf filter=lfs diff=lfs merge=lfs -text -papers/S79-Carbon[[:space:]]nanotube[[:space:]]cement-based[[:space:]]transducers[[:space:]]for[[:space:]]dynamic[[:space:]]sensing[[:space:]]of[[:space:]]strain.pdf filter=lfs diff=lfs merge=lfs -text -papers/S8-Electrically-cured-ultra-high-performance-concrete--UHPC--embe_2020_Material.pdf filter=lfs diff=lfs merge=lfs -text -papers/S80-MA~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S81-Piezoresistive[[:space:]]properties[[:space:]]of[[:space:]]ultra-high-performance[[:space:]]fiber-reinforced[[:space:]]concrete[[:space:]]incorporating[[:space:]]few-layer[[:space:]]graphene.pdf filter=lfs diff=lfs merge=lfs -text -papers/S82-SY~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S83-Effect[[:space:]]of[[:space:]]compressive[[:space:]]strain[[:space:]]on[[:space:]]electrical[[:space:]]resistivity[[:space:]]of[[:space:]]carbon[[:space:]]black-filled[[:space:]]cement-based[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S84-TA~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S85-Performance[[:space:]]of[[:space:]]cement-based[[:space:]]sensors[[:space:]]with[[:space:]]CNT[[:space:]]for[[:space:]]strain[[:space:]]sensing.pdf filter=lfs diff=lfs merge=lfs -text -papers/S86-EL~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S87-EL~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S88-ST~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S89-Piezoresistivity[[:space:]]of[[:space:]]carbon[[:space:]]fiber[[:space:]]graphite[[:space:]]cement-based[[:space:]]composites[[:space:]]with[[:space:]]CCCW.pdf filter=lfs diff=lfs merge=lfs -text -papers/S9-Electro-mechanical-self-sensing-response-of-ultra-high-_2018_Composites-Part.pdf filter=lfs diff=lfs merge=lfs -text -papers/S90-EX~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S91-A[[:space:]]comparative[[:space:]]study[[:space:]]on[[:space:]]the[[:space:]]influences[[:space:]]of[[:space:]]CNT[[:space:]]and[[:space:]]GNP[[:space:]]on[[:space:]]the[[:space:]]piezoresistivity[[:space:]]of[[:space:]]cement[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S92-Research-on-the-self-sensing-and-mechanical-properties-of_2021_Cement-and-Co.pdf filter=lfs diff=lfs merge=lfs -text -papers/S93-Enhanced[[:space:]]effects[[:space:]]of[[:space:]]carbon-based[[:space:]]conductive[[:space:]]materials[[:space:]]on[[:space:]]the[[:space:]]piezoresistive[[:space:]]characteristics[[:space:]]of[[:space:]]cementitious[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/S94-The[[:space:]]Utilization[[:space:]]of[[:space:]]Pearson’s[[:space:]]Method[[:space:]]to[[:space:]]Analyze[[:space:]]Piezoresistive[[:space:]]Effect[[:space:]]in[[:space:]]Self-Sensing[[:space:]]Cement[[:space:]]Composite[[:space:]]with[[:space:]]Graphite.pdf filter=lfs diff=lfs merge=lfs -text -papers/S95-SE~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S96-EL~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S97-Self-sensing[[:space:]]GFRP-reinforced[[:space:]]concrete[[:space:]]beams[[:space:]]containing[[:space:]]carbon[[:space:]]nanotube-nano[[:space:]]carbon[[:space:]]black[[:space:]]composite[[:space:]]fillers.pdf filter=lfs diff=lfs merge=lfs -text -papers/S98-MI~1.PDF filter=lfs diff=lfs merge=lfs -text -papers/S99-Commercial[[:space:]]and[[:space:]]recycled[[:space:]]carbon-based[[:space:]]fillers[[:space:]]and[[:space:]]fibers[[:space:]]for[[:space:]]self-sensing[[:space:]]cement-based[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/Self-sensing[[:space:]]enhancement[[:space:]]in[[:space:]]smart[[:space:]]ultra-high[[:space:]]performance[[:space:]]concrete[[:space:]]composites[[:space:]]via[[:space:]]multi-scale[[:space:]]carbon[[:space:]]black.pdf filter=lfs diff=lfs merge=lfs -text -papers/Self-sensing[[:space:]]performance[[:space:]]of[[:space:]]cementitious[[:space:]]composites[[:space:]]with[[:space:]]functional[[:space:]]fillers[[:space:]]at[[:space:]]macro,[[:space:]]micro[[:space:]]and[[:space:]]nano[[:space:]]scales.pdf filter=lfs diff=lfs merge=lfs -text -papers/Self‐Sensing[[:space:]]Cementitious[[:space:]]Composites[[:space:]]with[[:space:]]Hierarchical[[:space:]]Carbon[[:space:]]Fiber‐Carbon[[:space:]]Nanotube[[:space:]]Composite[[:space:]]Fillers.pdf filter=lfs diff=lfs merge=lfs -text -papers/Silane[[:space:]]treatment[[:space:]]of[[:space:]]bagasse[[:space:]]fiber[[:space:]]for[[:space:]]reinforcement[[:space:]]of[[:space:]]cementitious[[:space:]]composites.pdf filter=lfs diff=lfs merge=lfs -text -papers/The[[:space:]]effect[[:space:]]of[[:space:]]silane[[:space:]]surface[[:space:]]treatment[[:space:]]on[[:space:]]the[[:space:]]mechanical[[:space:]]properties[[:space:]]of[[:space:]]UHPFRC.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/app.py b/app.py index 00442a7acf41b448bc969169e4735e43fff020a3..28a2249667a93a014d4e82c824b79fd61ec32b80 100644 --- a/app.py +++ b/app.py @@ -1,12 +1,8 @@ -# ================================================================ +# vmm # Self-Sensing Concrete Assistant — Predictor (XGB) + Hybrid RAG -# - Uses local 'papers/' folder for literature -# - Robust MMR sentence selection (no list index errors) -# - Predictor: safe model caching + safe feature alignment -# - Stable categoricals ("NA"); no over-strict completeness gate -# - Lightweight instrumentation (JSONL logs per RAG turn) -# - Dark-blue theme + Evaluate tab + k-slider styling -# - Citations use SHORT CODES (e.g., S71, S92) from filenames +# - Predictor tab: identical behavior to your "second code" +# - Literature tab: from your "first code" (Hybrid RAG + MMR) +# - Hugging Face friendly: online PDF fetching OFF by default # ================================================================ # ---------------------- Runtime flags (HF-safe) ---------------------- @@ -16,9 +12,9 @@ os.environ["TRANSFORMERS_NO_FLAX"] = "1" os.environ["TOKENIZERS_PARALLELISM"] = "false" # ------------------------------- Imports ------------------------------ -import re, joblib, warnings, json, traceback, time, uuid, subprocess, sys +import re, time, joblib, warnings, json from pathlib import Path -from typing import List, Dict, Any, Optional +from typing import List, Dict, Any import numpy as np import pandas as pd @@ -39,21 +35,20 @@ except Exception: BM25Okapi = None print("rank_bm25 not installed; BM25 disabled (TF-IDF still works).") -# Optional OpenAI (for LLM synthesis) +# Optional OpenAI (for LLM paraphrase) OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") -OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-5") +OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-4o-mini").strip().strip('"').strip("'") + try: from openai import OpenAI except Exception: OpenAI = None -# LLM availability flag — used internally; UI remains hidden -LLM_AVAILABLE = (OPENAI_API_KEY is not None and OPENAI_API_KEY.strip() != "" and OpenAI is not None) +print("openAI: ", OpenAI) -# ========================= Predictor (kept) ========================= +# ========================= Predictor (kept same as 2nd) ========================= CF_COL = "Conductive Filler Conc. (wt%)" TARGET_COL = "Stress GF (MPa-1)" -CANON_NA = "NA" # canonical placeholder for categoricals MAIN_VARIABLES = [ "Filler 1 Type", @@ -110,133 +105,54 @@ CATEGORICAL_COLS = { "Current Type" } -DIM_CHOICES = ["0D", "1D", "2D", "3D", CANON_NA] -CURRENT_CHOICES = ["DC", "AC", CANON_NA] +DIM_CHOICES = ["0D", "1D", "2D", "3D", "NA"] +CURRENT_CHOICES = ["DC", "AC", "NA"] MODEL_CANDIDATES = [ "stress_gf_xgb.joblib", "models/stress_gf_xgb.joblib", "/home/user/app/stress_gf_xgb.joblib", - os.getenv("MODEL_PATH", "") ] -# ---------- Model caching + status ---------- -MODEL = None -MODEL_STATUS = "🔴 Model not loaded" - -def _try_load_model(): - global MODEL, MODEL_STATUS - for p in [x for x in MODEL_CANDIDATES if x]: +def _load_model_or_error(): + for p in MODEL_CANDIDATES: if os.path.exists(p): try: - MODEL = joblib.load(p) - MODEL_STATUS = f"🟢 Loaded model: {Path(p).name}" - print("[ModelLoad] Loaded:", p) - return + return joblib.load(p) except Exception as e: - print(f"[ModelLoad] Error from {p}: {e}") - traceback.print_exc() - MODEL = None - if MODEL is None: - MODEL_STATUS = "🔴 Model not found (place stress_gf_xgb.joblib at repo root or models/, or set MODEL_PATH)" - print("[ModelLoad]", MODEL_STATUS) - -_try_load_model() # load at import time - -def _canon_cat(v: Any) -> str: - """Stable, canonical category placeholder normalization.""" - if v is None: - return CANON_NA - s = str(v).strip() - if s == "" or s.upper() in {"N/A", "NONE", "NULL"}: - return CANON_NA - return s - -def _to_float_or_nan(v): - if v in ("", None): - return np.nan - try: - return float(str(v).replace(",", "")) - except Exception: - return np.nan + return f"Could not load model from {p}: {e}" + return ("Model file not found. Upload your trained pipeline as " + "stress_gf_xgb.joblib (or put it in models/).") def _coerce_to_row(form_dict: dict) -> pd.DataFrame: row = {} for col in MAIN_VARIABLES: v = form_dict.get(col, None) if col in NUMERIC_COLS: - row[col] = _to_float_or_nan(v) - elif col in CATEGORICAL_COLS: - row[col] = _canon_cat(v) + if v in ("", None): + row[col] = np.nan + else: + try: + row[col] = float(v) + except Exception: + row[col] = np.nan else: - s = str(v).strip() if v is not None else "" - row[col] = s if s else CANON_NA + row[col] = "" if v in (None, "NA") else str(v).strip() return pd.DataFrame([row], columns=MAIN_VARIABLES) -def _align_columns_to_model(df: pd.DataFrame, mdl) -> pd.DataFrame: - """ - SAFE alignment: - - If mdl.feature_names_in_ exists AND is a subset of df.columns (raw names), reorder to it. - - Else, try a Pipeline step (e.g., 'preprocessor') with feature_names_in_ subset of df.columns. - - Else, DO NOT align (let the pipeline handle columns by name). - """ - try: - feat = getattr(mdl, "feature_names_in_", None) - if isinstance(feat, (list, np.ndarray, pd.Index)): - feat = list(feat) - if all(c in df.columns for c in feat): - return df[feat] - - if hasattr(mdl, "named_steps"): - for key in ["preprocessor", "columntransformer"]: - if key in mdl.named_steps: - step = mdl.named_steps[key] - feat2 = getattr(step, "feature_names_in_", None) - if isinstance(feat2, (list, np.ndarray, pd.Index)): - feat2 = list(feat2) - if all(c in df.columns for c in feat2): - return df[feat2] - # fallback to first step if it exposes input names - try: - first_key = list(mdl.named_steps.keys())[0] - step = mdl.named_steps[first_key] - feat3 = getattr(step, "feature_names_in_", None) - if isinstance(feat3, (list, np.ndarray, pd.Index)): - feat3 = list(feat3) - if all(c in df.columns for c in feat3): - return df[feat3] - except Exception: - pass - - return df - except Exception as e: - print(f"[Align] Skip aligning due to: {e}") - traceback.print_exc() - return df - def predict_fn(**kwargs): - """ - Always attempt prediction. - - Missing numerics -> NaN (imputer handles) - - Categoricals -> 'NA' - - If model missing or inference error -> 0.0 (keeps UI stable) - """ - if MODEL is None: - return 0.0 + mdl = _load_model_or_error() + if isinstance(mdl, str): + return mdl X_new = _coerce_to_row(kwargs) - X_new = _align_columns_to_model(X_new, MODEL) try: - y_raw = MODEL.predict(X_new) # log1p or original scale depending on training - if getattr(MODEL, "target_is_log1p_", False): - y = np.expm1(y_raw) - else: - y = y_raw - y = float(np.asarray(y).ravel()[0]) - return max(y, 0.0) + y_log = mdl.predict(X_new) # model predicts log1p(target) + y = float(np.expm1(y_log)[0]) # back to original scale MPa^-1 + if -1e-10 < y < 0: + y = 0.0 + return y except Exception as e: - print(f"[Predict] {e}") - traceback.print_exc() - return 0.0 + return f"Prediction error: {e}" EXAMPLE = { "Filler 1 Type": "CNT", @@ -245,7 +161,7 @@ EXAMPLE = { "Filler 1 Length (mm)": 1.2, CF_COL: 0.5, "Filler 2 Type": "", - "Filler 2 Dimensionality": CANON_NA, + "Filler 2 Dimensionality": "NA", "Filler 2 Diameter (µm)": None, "Filler 2 Length (mm)": None, "Specimen Volume (mm3)": 1000, @@ -273,14 +189,15 @@ def _clear_all(): if col in NUMERIC_COLS: cleared.append(None) elif col in {"Filler 1 Dimensionality", "Filler 2 Dimensionality"}: - cleared.append(CANON_NA) + cleared.append("NA") elif col == "Current Type": - cleared.append(CANON_NA) + cleared.append("NA") else: cleared.append("") return cleared -# ========================= Hybrid RAG ========================= +# ========================= Hybrid RAG (from 1st code) ========================= +# Configuration ARTIFACT_DIR = Path("rag_artifacts"); ARTIFACT_DIR.mkdir(exist_ok=True) TFIDF_VECT_PATH = ARTIFACT_DIR / "tfidf_vectorizer.joblib" TFIDF_MAT_PATH = ARTIFACT_DIR / "tfidf_matrix.joblib" @@ -288,13 +205,16 @@ BM25_TOK_PATH = ARTIFACT_DIR / "bm25_tokens.joblib" EMB_NPY_PATH = ARTIFACT_DIR / "chunk_embeddings.npy" RAG_META_PATH = ARTIFACT_DIR / "chunks.parquet" -LOCAL_PDF_DIR = Path("papers"); LOCAL_PDF_DIR.mkdir(exist_ok=True) +# PDF source (HF-safe: rely on local /papers by default) +LOCAL_PDF_DIR = Path("./literature_pdfs"); LOCAL_PDF_DIR.mkdir(exist_ok=True) USE_ONLINE_SOURCES = os.getenv("USE_ONLINE_SOURCES", "false").lower() == "true" +# Retrieval weights W_TFIDF_DEFAULT = 0.50 if not USE_DENSE else 0.30 W_BM25_DEFAULT = 0.50 if not USE_DENSE else 0.30 -W_EMB_DEFAULT = 0.00 if USE_DENSE is False else 0.40 +W_EMB_DEFAULT = 0.00 if not USE_DENSE else 0.40 +# Simple text processing _SENT_SPLIT_RE = re.compile(r"(?<=[.!?])\s+|\n+") TOKEN_RE = re.compile(r"[A-Za-z0-9_#+\-/\.%]+") def sent_split(text: str) -> List[str]: @@ -303,6 +223,7 @@ def sent_split(text: str) -> List[str]: def tokenize(text: str) -> List[str]: return [t.lower() for t in TOKEN_RE.findall(text)] +# PDF text extraction (PyMuPDF preferred; pypdf fallback) def _extract_pdf_text(pdf_path: Path) -> str: try: import fitz @@ -344,8 +265,8 @@ def _safe_init_st_model(name: str): USE_DENSE = False return None +# Build or load index def build_or_load_hybrid(pdf_dir: Path): - # Build or load the hybrid retriever cache have_cache = (TFIDF_VECT_PATH.exists() and TFIDF_MAT_PATH.exists() and RAG_META_PATH.exists() and (BM25_TOK_PATH.exists() or BM25Okapi is None) @@ -369,11 +290,13 @@ def build_or_load_hybrid(pdf_dir: Path): rows.append({"doc_path": str(pdf), "chunk_id": i, "text": ch}) all_tokens.append(tokenize(ch)) if not rows: + # create empty stub to avoid crashes; UI will message user to upload PDFs meta = pd.DataFrame(columns=["doc_path", "chunk_id", "text"]) vectorizer = None; X_tfidf = None; emb = None; all_tokens = None return vectorizer, X_tfidf, meta, all_tokens, emb meta = pd.DataFrame(rows) + from sklearn.feature_extraction.text import TfidfVectorizer vectorizer = TfidfVectorizer( ngram_range=(1,2), @@ -397,11 +320,13 @@ def build_or_load_hybrid(pdf_dir: Path): print("Dense embedding failed:", e) emb = None + # Save artifacts joblib.dump(vectorizer, TFIDF_VECT_PATH) joblib.dump(X_tfidf, TFIDF_MAT_PATH) if BM25Okapi is not None: joblib.dump(all_tokens, BM25_TOK_PATH) meta.to_parquet(RAG_META_PATH, index=False) + return vectorizer, X_tfidf, meta, all_tokens, emb tfidf_vectorizer, tfidf_matrix, rag_meta, bm25_tokens, emb_matrix = build_or_load_hybrid(LOCAL_PDF_DIR) @@ -409,29 +334,9 @@ bm25 = BM25Okapi(bm25_tokens) if (BM25Okapi is not None and bm25_tokens is not N st_query_model = _safe_init_st_model(os.getenv("EMB_MODEL_NAME", "sentence-transformers/all-MiniLM-L6-v2")) def _extract_page(text_chunk: str) -> str: - # Correct: [[PAGE=123]] m = list(re.finditer(r"\[\[PAGE=(\d+)\]\]", text_chunk or "")) return (m[-1].group(1) if m else "?") -def _short_doc_code(doc_path: str) -> str: - """ - Turn a full filename like: - 'S92-Research-on-the-self-sensing-and-mechanical-properties-of_2021_Cement-and-Co.pdf' - into a short code: - 'S92' - For generic names, falls back to the first token of the stem. - """ - if not doc_path: - return "Source" - name = Path(doc_path).name - stem = name.rsplit(".", 1)[0] - # Split on whitespace, hyphen, underscore - parts = re.split(r"[ \t\n\r\-_]+", stem) - for p in parts: - if p: - return p - return stem or "Source" - def hybrid_search(query: str, k=8, w_tfidf=W_TFIDF_DEFAULT, w_bm25=W_BM25_DEFAULT, w_emb=W_EMB_DEFAULT): if rag_meta is None or rag_meta.empty: return pd.DataFrame() @@ -458,7 +363,7 @@ def hybrid_search(query: str, k=8, w_tfidf=W_TFIDF_DEFAULT, w_bm25=W_BM25_DEFAUL # BM25 scores if bm25 is not None: - q_tokens = [t.lower() for t in re.findall(r"[A-Za-z0-9_#+\-\/\.%]+", query)] + q_tokens = [t.lower() for t in re.findall(r"[A-Za-z0-9_#+\-/\.%]+", query)] bm25_scores = np.array(bm25.get_scores(q_tokens), dtype=float) else: bm25_scores = np.zeros(len(rag_meta), dtype=float); w_bm25 = 0.0 @@ -490,114 +395,71 @@ def split_sentences(text: str) -> List[str]: return [s for s in sents if 6 <= len(s.split()) <= 60] def mmr_select_sentences(question: str, hits: pd.DataFrame, top_n=4, pool_per_chunk=6, lambda_div=0.7): - """ - Robust MMR sentence picker: - - Handles empty pools - - Clamps top_n to pool size - - Avoids 'list index out of range' - """ - # Build pool pool = [] for _, row in hits.iterrows(): - doc_code = _short_doc_code(row["doc_path"]) + doc = Path(row["doc_path"]).name page = _extract_page(row["text"]) - sents = split_sentences(row["text"]) - if not sents: - continue - for s in sents[:max(1, int(pool_per_chunk))]: - pool.append({"sent": s, "doc": doc_code, "page": page}) - + for s in split_sentences(row["text"])[:pool_per_chunk]: + pool.append({"sent": s, "doc": doc, "page": page}) if not pool: return [] - # Relevance vectors sent_texts = [p["sent"] for p in pool] + + # Embedding-based relevance if available, else TF-IDF use_dense = USE_DENSE and st_query_model is not None - try: - if use_dense: + if use_dense: + try: from sklearn.preprocessing import normalize as sk_normalize - enc = st_query_model.encode([question] + sent_texts, convert_to_numpy=True) + texts = [question] + sent_texts + enc = st_query_model.encode(texts, convert_to_numpy=True) q_vec = sk_normalize(enc[:1])[0] S = sk_normalize(enc[1:]) rel = (S @ q_vec) def sim_fn(i, j): return float(S[i] @ S[j]) - else: - from sklearn.feature_extraction.text import TfidfVectorizer - vect = TfidfVectorizer().fit(sent_texts + [question]) - Q = vect.transform([question]); S = vect.transform(sent_texts) - rel = (S @ Q.T).toarray().ravel() - def sim_fn(i, j): - num = (S[i] @ S[j].T) - return float(num.toarray()[0, 0]) if hasattr(num, "toarray") else float(num) - except Exception: - # Fallback: uniform relevance if vectorization fails - rel = np.ones(len(sent_texts), dtype=float) - def sim_fn(i, j): return 0.0 + except Exception: + use_dense = False - # Normalize lambda_div - lambda_div = float(np.clip(lambda_div, 0.0, 1.0)) + if not use_dense: + from sklearn.feature_extraction.text import TfidfVectorizer + vect = TfidfVectorizer().fit(sent_texts + [question]) + Q = vect.transform([question]); S = vect.transform(sent_texts) + rel = (S @ Q.T).toarray().ravel() + def sim_fn(i, j): return float((S[i] @ S[j].T).toarray()[0, 0]) - # Select first by highest relevance + selected, selected_idx = [], [] remain = list(range(len(pool))) - if not remain: - return [] first = int(np.argmax(rel)) - selected_idx = [first] - selected = [pool[first]] - remain.remove(first) + selected.append(pool[first]); selected_idx.append(first); remain.remove(first) - # Clamp top_n - max_pick = min(int(top_n), len(pool)) - while len(selected) < max_pick and remain: + while len(selected) < top_n and remain: cand_scores = [] for i in remain: - div_i = max(sim_fn(i, j) for j in selected_idx) if selected_idx else 0.0 - score = lambda_div * float(rel[i]) - (1.0 - lambda_div) * div_i + sim_to_sel = max(sim_fn(i, j) for j in selected_idx) if selected_idx else 0.0 + score = lambda_div * rel[i] - (1 - lambda_div) * sim_to_sel cand_scores.append((score, i)) - if not cand_scores: - break cand_scores.sort(reverse=True) - _, best_i = cand_scores[0] - selected_idx.append(best_i) - selected.append(pool[best_i]) - remain.remove(best_i) - + best_i = cand_scores[0][1] + selected.append(pool[best_i]); selected_idx.append(best_i); remain.remove(best_i) return selected def compose_extractive(selected: List[Dict[str, Any]]) -> str: if not selected: return "" - # Citations inside answer are short codes only, e.g. (S92), (S71) - return " ".join(f"{s['sent']} ({s['doc']})" for s in selected) - -# ========================= NEW: Instrumentation helpers ========================= -LOG_PATH = ARTIFACT_DIR / "rag_logs.jsonl" -OPENAI_IN_COST_PER_1K = float(os.getenv("OPENAI_COST_IN_PER_1K", "0")) -OPENAI_OUT_COST_PER_1K = float(os.getenv("OPENAI_COST_OUT_PER_1K", "0")) + return " ".join(f"{s['sent']} ({s['doc']}, p.{s['page']})" for s in selected) -def _safe_write_jsonl(path: Path, record: dict): - try: - with open(path, "a", encoding="utf-8") as f: - f.write(json.dumps(record, ensure_ascii=False) + "\n") - except Exception as e: - print("[Log] write failed:", e) - -def _calc_cost_usd(prompt_toks, completion_toks): - if prompt_toks is None or completion_toks is None: +def synthesize_with_llm(question: str, sentence_lines: List[str], model: str = None, temperature: float = 0.2) -> str: + if OPENAI_API_KEY is None or OpenAI is None: return None - return (prompt_toks / 1000.0) * OPENAI_IN_COST_PER_1K + (completion_toks / 1000.0) * OPENAI_OUT_COST_PER_1K - -# ----------------- Modified to return (text, usage_dict) ----------------- -def synthesize_with_llm(question: str, sentence_lines: List[str], model: str = None, temperature: float = 0.2): - if not LLM_AVAILABLE: - return None, None + print("calling LLM api") client = OpenAI(api_key=OPENAI_API_KEY) model = model or OPENAI_MODEL + print("using: ", model) SYSTEM_PROMPT = ( "You are a scientific assistant for self-sensing cementitious materials.\n" "Answer STRICTLY using the provided sentences.\n" "Do not invent facts. Keep it concise (3–6 sentences).\n" - "Retain inline citations exactly as given (e.g., (S92), (S92; S71))." + "Retain inline citations like (Doc.pdf, p.X) exactly as given." ) user_prompt = ( f"Question: {question}\n\n" @@ -613,186 +475,61 @@ def synthesize_with_llm(question: str, sentence_lines: List[str], model: str = N ], temperature=temperature, ) - out_text = getattr(resp, "output_text", None) or str(resp) - usage = None - try: - u = getattr(resp, "usage", None) - if u: - pt = getattr(u, "prompt_tokens", None) if hasattr(u, "prompt_tokens") else u.get("prompt_tokens", None) - ct = getattr(u, "completion_tokens", None) if hasattr(u, "completion_tokens") else u.get("completion_tokens", None) - usage = {"prompt_tokens": pt, "completion_tokens": ct} - except Exception: - usage = None - return out_text, usage - except Exception: - return None, None + print(resp.output_text) + return getattr(resp, "output_text", None) or str(resp) + except Exception as e: + print("error in LLM synthesis:", e) + return None + def rag_reply( question: str, k: int = 8, n_sentences: int = 4, include_passages: bool = False, - use_llm: bool = False, - model: str = None, + use_llm: bool = True, + model: str = "gpt-4o-mini", temperature: float = 0.2, strict_quotes_only: bool = False, w_tfidf: float = W_TFIDF_DEFAULT, w_bm25: float = W_BM25_DEFAULT, w_emb: float = W_EMB_DEFAULT ) -> str: - run_id = str(uuid.uuid4()) - t0_total = time.time() - t0_retr = time.time() - - # --- Retrieval --- hits = hybrid_search(question, k=k, w_tfidf=w_tfidf, w_bm25=w_bm25, w_emb=w_emb) - t1_retr = time.time() - latency_ms_retriever = int((t1_retr - t0_retr) * 1000) - if hits is None or hits.empty: - final = "No indexed PDFs found. Upload PDFs to the 'papers/' folder and reload the Space." - record = { - "run_id": run_id, - "ts": int(time.time()*1000), - "inputs": { - "question": question, "top_k": int(k), "n_sentences": int(n_sentences), - "w_tfidf": float(w_tfidf), "w_bm25": float(w_bm25), "w_emb": float(w_emb), - "use_llm": bool(use_llm), "model": model, "temperature": float(temperature) - }, - "retrieval": {"hits": [], "latency_ms_retriever": latency_ms_retriever}, - "output": {"final_answer": final, "used_sentences": []}, - "latency_ms_total": int((time.time()-t0_total)*1000), - "openai": None - } - _safe_write_jsonl(LOG_PATH, record) - return final - - # Select sentences + return "No indexed PDFs found. Upload PDFs to the 'papers/' folder and reload the Space." + selected = mmr_select_sentences(question, hits, top_n=int(n_sentences), pool_per_chunk=6, lambda_div=0.7) + header_cites = "; ".join(f"{Path(r['doc_path']).name} (p.{_extract_page(r['text'])})" for _, r in hits.head(6).iterrows()) + srcs = {Path(r['doc_path']).name for _, r in hits.iterrows()} + coverage_note = "" if len(srcs) >= 3 else f"\n\n> Note: Only {len(srcs)} unique source(s) contributed. Add more PDFs or increase Top-K." - # Header citations: short codes only, joined by '; ' (e.g., "S55; S71; S92") - header_codes = [] - for _, r in hits.head(6).iterrows(): - code = _short_doc_code(r["doc_path"]) - if code not in header_codes: - header_codes.append(code) - header_cites = "; ".join(header_codes) - src_codes = set(header_codes) - coverage_note = "" if len(src_codes) >= 3 else f"\n\n> Note: Only {len(src_codes)} unique source(s) contributed. Add more PDFs or increase Top-K." - - # Prepare retrieval list for logging (full filenames kept here) - retr_list = [] - for _, r in hits.iterrows(): - retr_list.append({ - "doc": Path(r["doc_path"]).name, - "page": _extract_page(r["text"]), - "score_tfidf": float(r.get("score_tfidf", 0.0)), - "score_bm25": float(r.get("score_bm25", 0.0)), - "score_dense": float(r.get("score_dense", 0.0)), - "combo_score": float(r.get("score", 0.0)), - }) - - # Strict quotes only (no LLM) if strict_quotes_only: if not selected: - final = ( - "**Quoted Passages:**\n\n---\n" + - "\n\n".join(hits['text'].tolist()[:2]) + - f"\n\n**Citations:** {header_cites}{coverage_note}" - ) - else: - bullets = "\n- ".join(f"{s['sent']} ({s['doc']})" for s in selected) - final = f"**Quoted Passages:**\n- {bullets}\n\n**Citations:** {header_cites}{coverage_note}" - if include_passages: - final += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) - - record = { - "run_id": run_id, - "ts": int(time.time()*1000), - "inputs": { - "question": question, "top_k": int(k), "n_sentences": int(n_sentences), - "w_tfidf": float(w_tfidf), "w_bm25": float(w_bm25), "w_emb": float(w_emb), - "use_llm": False, "model": None, "temperature": float(temperature) - }, - "retrieval": {"hits": retr_list, "latency_ms_retriever": latency_ms_retriever}, - "output": { - "final_answer": final, - "used_sentences": [{"sent": s["sent"], "doc": s["doc"], "page": s["page"]} for s in selected] - }, - "latency_ms_total": int((time.time()-t0_total)*1000), - "openai": None - } - _safe_write_jsonl(LOG_PATH, record) - return final - - # Extractive or LLM synthesis + return f"**Quoted Passages:**\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) + f"\n\n**Citations:** {header_cites}{coverage_note}" + msg = "**Quoted Passages:**\n- " + "\n- ".join(f"{s['sent']} ({s['doc']}, p.{s['page']})" for s in selected) + msg += f"\n\n**Citations:** {header_cites}{coverage_note}" + if include_passages: + msg += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) + return msg + extractive = compose_extractive(selected) - llm_usage = None - llm_latency_ms = None if use_llm and selected: - # Lines already carry short-code citations, e.g. "... (S92)" - lines = [f"{s['sent']} ({s['doc']})" for s in selected] - t0_llm = time.time() - llm_text, llm_usage = synthesize_with_llm(question, lines, model=model, temperature=temperature) - t1_llm = time.time() - llm_latency_ms = int((t1_llm - t0_llm) * 1000) - + lines = [f"{s['sent']} ({s['doc']}, p.{s['page']})" for s in selected] + llm_text = synthesize_with_llm(question, lines, model=model, temperature=temperature) if llm_text: - final = f"**Answer (LLM synthesis):** {llm_text}\n\n**Citations:** {header_cites}{coverage_note}" + msg = f"**Answer (LLM synthesis):** {llm_text}\n\n**Citations:** {header_cites}{coverage_note}" if include_passages: - final += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) - else: - if not extractive: - final = ( - f"**Answer:** Here are relevant passages.\n\n" - f"**Citations:** {header_cites}{coverage_note}\n\n---\n" + - "\n\n".join(hits['text'].tolist()[:2]) - ) - else: - final = f"**Answer:** {extractive}\n\n**Citations:** {header_cites}{coverage_note}" - if include_passages: - final += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) - else: - if not extractive: - final = ( - f"**Answer:** Here are relevant passages.\n\n" - f"**Citations:** {header_cites}{coverage_note}\n\n---\n" + - "\n\n".join(hits['text'].tolist()[:2]) - ) - else: - final = f"**Answer:** {extractive}\n\n**Citations:** {header_cites}{coverage_note}" - if include_passages: - final += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) - - # --------- Log full run --------- - prompt_toks = llm_usage.get("prompt_tokens") if llm_usage else None - completion_toks = llm_usage.get("completion_tokens") if llm_usage else None - cost_usd = _calc_cost_usd(prompt_toks, completion_toks) - - total_ms = int((time.time() - t0_total) * 1000) - record = { - "run_id": run_id, - "ts": int(time.time()*1000), - "inputs": { - "question": question, "top_k": int(k), "n_sentences": int(n_sentences), - "w_tfidf": float(w_tfidf), "w_bm25": float(w_bm25), "w_emb": float(w_emb), - "use_llm": bool(use_llm), "model": model, "temperature": float(temperature) - }, - "retrieval": {"hits": retr_list, "latency_ms_retriever": latency_ms_retriever}, - "output": { - "final_answer": final, - "used_sentences": [{"sent": s['sent'], "doc": s['doc'], "page": s['page']} for s in selected] - }, - "latency_ms_total": total_ms, - "latency_ms_llm": llm_latency_ms, - "openai": { - "prompt_tokens": prompt_toks, - "completion_tokens": completion_toks, - "cost_usd": cost_usd - } if use_llm else None - } - _safe_write_jsonl(LOG_PATH, record) - return final + msg += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) + return msg + + if not extractive: + return f"**Answer:** Here are relevant passages.\n\n**Citations:** {header_cites}{coverage_note}\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) + + msg = f"**Answer:** {extractive}\n\n**Citations:** {header_cites}{coverage_note}" + if include_passages: + msg += "\n\n---\n" + "\n\n".join(hits['text'].tolist()[:2]) + return msg def rag_chat_fn(message, history, top_k, n_sentences, include_passages, use_llm, model_name, temperature, strict_quotes_only, @@ -816,225 +553,24 @@ def rag_chat_fn(message, history, top_k, n_sentences, include_passages, except Exception as e: return f"RAG error: {e}" -# ========================= UI (science-oriented styling) ========================= +# ========================= UI (predictor styling kept) ========================= CSS = """ -/* Science-oriented: crisp contrast + readable numerics */ -* {font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;} +/* Blue to green gradient background */ .gradio-container { - background: linear-gradient(135deg, #0b1020 0%, #0c2b1a 60%, #0a2b4d 100%) !important; -} -.card {background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;} -label {color: #e8f7ff !important; text-shadow: 0 1px 0 rgba(0,0,0,0.35); cursor: pointer;} -input[type="number"] {font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;} - -/* Checkbox clickability fixes */ -input[type="checkbox"], .gr-checkbox, .gr-checkbox > * { pointer-events: auto !important; } -.gr-checkbox label, .gr-check-radio label { pointer-events: auto !important; cursor: pointer; } -#rag-tab input[type="checkbox"] { accent-color: #60a5fa !important; } - -/* RAG tab styling */ -#rag-tab .block, #rag-tab .group, #rag-tab .accordion { - background: linear-gradient(160deg, #1f2937 0%, #14532d 55%, #0b3b68 100%) !important; - border-radius: 12px; - border: 1px solid rgba(255,255,255,0.14); -} -#rag-tab input, #rag-tab textarea, #rag-tab select, #rag-tab .scroll-hide, #rag-tab .chatbot textarea { - background: rgba(17, 24, 39, 0.85) !important; - border: 1px solid #60a5fa !important; - color: #e5f2ff !important; -} -#rag-tab input[type="range"] { accent-color: #22c55e !important; } -#rag-tab button { border-radius: 10px !important; font-weight: 600 !important; } -#rag-tab .chatbot { - background: rgba(15, 23, 42, 0.6) !important; - border: 1px solid rgba(148, 163, 184, 0.35) !important; -} -#rag-tab .message.user { - background: rgba(34, 197, 94, 0.15) !important; - border-left: 3px solid #22c55e !important; -} -#rag-tab .message.bot { - background: rgba(59, 130, 246, 0.15) !important; - border-left: 3px solid #60a5fa !important; - color: #eef6ff !important; -} - -/* Evaluate tab dark/high-contrast styling */ -#eval-tab .block, #eval-tab .group, #eval-tab .accordion { - background: linear-gradient(165deg, #0a0f1f 0%, #0d1a31 60%, #0a1c2e 100%) !important; - border-radius: 12px; - border: 1px solid rgba(139, 197, 255, 0.28); -} -#eval-tab label, #eval-tab .markdown, #eval-tab .prose, #eval-tab p, #eval-tab span { - color: #e6f2ff !important; -} -#eval-tab input, #eval-tab .gr-file, #eval-tab .scroll-hide, #eval-tab textarea, #eval-tab select { - background: rgba(8, 13, 26, 0.9) !important; - border: 1px solid #3b82f6 !important; - color: #dbeafe !important; -} -#eval-tab input[type="range"] { accent-color: #22c55e !important; } -#eval-tab button { - border-radius: 10px !important; - font-weight: 700 !important; - background: #0ea5e9 !important; - color: #001321 !important; - border: 1px solid #7dd3fc !important; -} -#eval-tab .gr-json, #eval-tab .markdown pre, #eval-tab .markdown code { - background: rgba(2, 6, 23, 0.85) !important; - color: #e2e8f0 !important; - border: 1px solid rgba(148, 163, 184, 0.3) !important; - border-radius: 10px !important; -} - -/* Predictor output emphasis */ -#pred-out .wrap { font-size: 20px; font-weight: 700; color: #ecfdf5; } - -/* Tab header: darker blue theme for all tabs */ -.gradio-container .tab-nav button[role="tab"] { - background: #0b1b34 !important; - color: #cfe6ff !important; - border: 1px solid #1e3a8a !important; -} -.gradio-container .tab-nav button[role="tab"][aria-selected="true"] { - background: #0e2a57 !important; - color: #e0f2fe !important; - border-color: #3b82f6 !important; -} - -/* Evaluate tab: enforce dark-blue text for labels/marks */ -#eval-tab .label, -#eval-tab label, -#eval-tab .gr-slider .label, -#eval-tab .wrap .label, -#eval-tab .prose, -#eval-tab .markdown, -#eval-tab p, -#eval-tab span { - color: #cfe6ff !important; -} - -/* Target the specific k-slider label strongly */ -#k-slider .label, -#k-slider label, -#k-slider .wrap .label { - color: #cfe6ff !important; - text-shadow: 0 1px 0 rgba(0,0,0,0.35); -} - -/* Slider track/thumb (dark blue gradient + blue thumb) */ -#eval-tab input[type="range"] { - accent-color: #3b82f6 !important; -} - -/* WebKit */ -#eval-tab input[type="range"]::-webkit-slider-runnable-track { - height: 6px; - background: linear-gradient(90deg, #0b3b68, #1e3a8a); - border-radius: 4px; -} -#eval-tab input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - margin-top: -6px; - width: 18px; height: 18px; - background: #1d4ed8; - border: 1px solid #60a5fa; - border-radius: 50%; -} - -/* Firefox */ -#eval-tab input[type="range"]::-moz-range-track { - height: 6px; - background: linear-gradient(90deg, #0b3b68, #1e3a8a); - border-radius: 4px; -} -#eval-tab input[type="range"]::-moz-range-thumb { - width: 18px; height: 18px; - background: #1d4ed8; - border: 1px solid #60a5fa; - border-radius: 50%; -} - -/* ======== PATCH: Style the File + JSON outputs by ID ======== */ -#perq-file, #agg-file { - background: rgba(8, 13, 26, 0.9) !important; - border: 1px solid #3b82f6 !important; - border-radius: 12px !important; - padding: 8px !important; -} -#perq-file * , #agg-file * { color: #dbeafe !important; } -#perq-file a, #agg-file a { - background: #0e2a57 !important; - color: #e0f2fe !important; - border: 1px solid #60a5fa !important; - border-radius: 8px !important; - padding: 6px 10px !important; - text-decoration: none !important; -} -#perq-file a:hover, #agg-file a:hover { - background: #10356f !important; - border-color: #93c5fd !important; -} -/* File preview wrappers (covers multiple Gradio render modes) */ -#perq-file .file-preview, #agg-file .file-preview, -#perq-file .wrap, #agg-file .wrap { - background: rgba(2, 6, 23, 0.85) !important; - border-radius: 10px !important; - border: 1px solid rgba(148,163,184,.3) !important; -} - -/* JSON output: dark panel + readable text */ -#agg-json { - background: rgba(2, 6, 23, 0.85) !important; - border: 1px solid rgba(148,163,184,.35) !important; - border-radius: 12px !important; - padding: 8px !important; -} -#agg-json *, #agg-json .json, #agg-json .wrap { color: #e6f2ff !important; } -#agg-json pre, #agg-json code { - background: rgba(4, 10, 24, 0.9) !important; - color: #e2e8f0 !important; - border: 1px solid rgba(148,163,184,.35) !important; - border-radius: 10px !important; -} -/* Tree/overflow modes */ -#agg-json [data-testid="json-tree"], -#agg-json [role="tree"], -#agg-json .overflow-auto { - background: rgba(4, 10, 24, 0.9) !important; - color: #e6f2ff !important; - border-radius: 10px !important; - border: 1px solid rgba(148,163,184,.35) !important; -} - -/* Eval log markdown */ -#eval-log, #eval-log * { color: #cfe6ff !important; } -#eval-log pre, #eval-log code { - background: rgba(2, 6, 23, 0.85) !important; - color: #e2e8f0 !important; - border: 1px solid rgba(148,163,184,.3) !important; - border-radius: 10px !important; -} - -/* When Evaluate tab is active and JS has added .eval-active, bump contrast subtly */ -#eval-tab.eval-active .block, -#eval-tab.eval-active .group { - border-color: #60a5fa !important; -} -#eval-tab.eval-active .label { - color: #e6f2ff !important; + background: linear-gradient(135deg, #1e3a8a 0%, #166534 60%, #15803d 100%) !important; } +* {font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;} +.card {background: rgba(255,255,255,0.07) !important; border: 1px solid rgba(255,255,255,0.12);} +label.svelte-1ipelgc {color: #e0f2fe !important;} """ theme = gr.themes.Soft( primary_hue="blue", neutral_hue="green" ).set( - body_background_fill="#0b1020", + body_background_fill="#1e3a8a", body_text_color="#e0f2fe", - input_background_fill="#0f172a", + input_background_fill="#172554", input_border_color="#1e40af", button_primary_background_fill="#2563eb", button_primary_text_color="#ffffff", @@ -1043,37 +579,12 @@ theme = gr.themes.Soft( ) with gr.Blocks(css=CSS, theme=theme, fill_height=True) as demo: - # Optional: JS to toggle .eval-active when Evaluate tab selected - gr.HTML(""" - - """) - gr.Markdown( "
"
- "Left: ML prediction for Stress Gauge Factor (original scale, MPa-1). "
- "Right: Literature Q&A via Hybrid RAG (BM25 + TF-IDF + optional dense) with MMR sentence selection. "
- "Answers cite short document codes (e.g., S71, S92)."
+ "Left tab: ML prediction for Stress Gauge Factor (kept identical to your deployed predictor). "
+ "Right tab: Literature Q&A via Hybrid RAG (BM25 + TF-IDF + optional dense) with MMR sentence selection. "
+ "Upload PDFs into papers/ in your Space repo."
"
papers/ — **{pdf_count} PDF(s)** indexed. "
- "Upload more PDFs and reload the Space to expand coverage. "
- "Answers cite short document codes such as S71, S92."
+ "Upload PDFs into the repository folder papers/ then reload the Space. "
+ "Answers cite (Doc.pdf, p.X). Toggle strict quotes or optional LLM paraphrasing."
)
with gr.Row():
top_k = gr.Slider(5, 12, value=8, step=1, label="Top-K chunks")
n_sentences = gr.Slider(2, 6, value=4, step=1, label="Answer length (sentences)")
- include_passages = gr.Checkbox(value=False, label="Include supporting passages", interactive=True)
-
+ include_passages = gr.Checkbox(value=False, label="Include supporting passages")
with gr.Accordion("Retriever weights (advanced)", open=False):
w_tfidf = gr.Slider(0.0, 1.0, value=W_TFIDF_DEFAULT, step=0.05, label="TF-IDF weight")
w_bm25 = gr.Slider(0.0, 1.0, value=W_BM25_DEFAULT, step=0.05, label="BM25 weight")
- w_emb = gr.Slider(0.0, 1.0, value=(0.0 if not USE_DENSE else 0.40), step=0.05, label="Dense weight (set 0 if disabled)")
-
- # Hidden states (unchanged)
- state_use_llm = gr.State(LLM_AVAILABLE)
- state_model_name = gr.State(os.getenv("OPENAI_MODEL", OPENAI_MODEL))
- state_temperature = gr.State(0.2)
- state_strict = gr.State(False)
-
+ w_emb = gr.Slider(0.0, 1.0, value=W_EMB_DEFAULT, step=0.05, label="Dense weight (set 0 if disabled)")
+ with gr.Accordion("LLM & Controls", open=False):
+ strict_quotes_only = gr.Checkbox(value=False, label="Strict quotes only (no paraphrasing)")
+ use_llm = gr.Checkbox(value=True, label="Use LLM to paraphrase selected sentences")
+ model_name = gr.Textbox(value=os.getenv("OPENAI_MODEL", OPENAI_MODEL),
+ label="LLM model", placeholder="e.g., gpt-5 or gpt-5-mini")
+ temperature = gr.Slider(0.0, 1.0, value=0.2, step=0.05, label="Temperature")
gr.ChatInterface(
fn=rag_chat_fn,
- additional_inputs=[
- top_k, n_sentences, include_passages,
- state_use_llm, state_model_name, state_temperature, state_strict,
- w_tfidf, w_bm25, w_emb
- ],
+ additional_inputs=[top_k, n_sentences, include_passages, use_llm, model_name,
+ temperature, strict_quotes_only, w_tfidf, w_bm25, w_emb],
title="Literature Q&A",
- description="Hybrid retrieval with diversity. Answers carry inline short-code citations (e.g., (S92), (S71))."
+ description="Hybrid retrieval with diversity. Answers carry inline (Doc, p.X) citations. Toggle strict/LLM modes."
)
- # ====== Evaluate (Gold vs Logs) ======
- with gr.Tab("📏 Evaluate (Gold vs Logs)", elem_id="eval-tab"):
- gr.Markdown("Upload your **gold.csv** and compute metrics against the app logs.")
- with gr.Row():
- gold_file = gr.File(label="gold.csv", file_types=[".csv"], interactive=True)
- k_slider = gr.Slider(3, 12, value=8, step=1, label="k for Hit/Recall/nDCG", elem_id="k-slider")
- with gr.Row():
- btn_eval = gr.Button("Compute Metrics", variant="primary")
- with gr.Row():
- out_perq = gr.File(label="Per-question metrics (CSV)", elem_id="perq-file")
- out_agg = gr.File(label="Aggregate metrics (JSON)", elem_id="agg-file")
- out_json = gr.JSON(label="Aggregate summary", elem_id="agg-json")
- out_log = gr.Markdown(label="Run log", elem_id="eval-log")
-
- def _run_eval_inproc(gold_path: str, k: int = 8):
- import json as _json
- out_dir = str(ARTIFACT_DIR)
- logs = str(LOG_PATH)
- cmd = [
- sys.executable, "rag_eval_metrics.py",
- "--gold_csv", gold_path,
- "--logs_jsonl", logs,
- "--k", str(k),
- "--out_dir", out_dir
- ]
- try:
- p = subprocess.run(cmd, capture_output=True, text=True, check=False)
- stdout = p.stdout or ""
- stderr = p.stderr or ""
- perq = ARTIFACT_DIR / "metrics_per_question.csv"
- agg = ARTIFACT_DIR / "metrics_aggregate.json"
- agg_json = {}
- if agg.exists():
- agg_json = _json.loads(agg.read_text(encoding="utf-8"))
- report = "```\n" + (stdout.strip() or "(no stdout)") + ("\n" + stderr.strip() if stderr else "") + "\n```"
- return (str(perq) if perq.exists() else None,
- str(agg) if agg.exists() else None,
- agg_json,
- report)
- except Exception as e:
- return (None, None, {}, f"**Eval error:** {e}")
-
- def _eval_wrapper(gf, k):
- from pathlib import Path as _Path
- if gf is None:
- default_gold = _Path("gold.csv")
- if not default_gold.exists():
- return None, None, {}, "**No gold.csv provided or found in repo root.**"
- gold_path = str(default_gold)
- else:
- gold_path = gf.name
- return _run_eval_inproc(gold_path, int(k))
-
- btn_eval.click(_eval_wrapper, inputs=[gold_file, k_slider],
- outputs=[out_perq, out_agg, out_json, out_log])
-
# ------------- Launch -------------
if __name__ == "__main__":
+ # queue() helps HF Spaces with concurrency; show_error suggests upload PDFs if none
demo.queue().launch()
-
- # After launch: export a simple list of PDFs as paper_list.csv
- import os as _os
- import pandas as _pd
- folder = "papers"
- files = sorted(_os.listdir(folder)) if _os.path.exists(folder) else []
- _pd.DataFrame({"doc": files}).to_csv("paper_list.csv", index=False)
- print("✅ Saved paper_list.csv with", len(files), "papers")
diff --git a/papers/Carbon fiber reinforced cement improved by using silane-treated carbon fibers.pdf b/literature_pdfs/Carbon fiber reinforced cement improved by using silane-treated carbon fibers.pdf
similarity index 100%
rename from papers/Carbon fiber reinforced cement improved by using silane-treated carbon fibers.pdf
rename to literature_pdfs/Carbon fiber reinforced cement improved by using silane-treated carbon fibers.pdf
diff --git a/papers/Silane-treated carbon fiber for reinforcing cement.pdf b/literature_pdfs/Silane-treated carbon fiber for reinforcing cement.pdf
similarity index 100%
rename from papers/Silane-treated carbon fiber for reinforcing cement.pdf
rename to literature_pdfs/Silane-treated carbon fiber for reinforcing cement.pdf
diff --git a/papers/1-s2.0-S095006181732278X-main.pdf b/papers/1-s2.0-S095006181732278X-main.pdf
deleted file mode 100644
index 23873262db57fe7b408d8b5867b71ca8596f3e83..0000000000000000000000000000000000000000
--- a/papers/1-s2.0-S095006181732278X-main.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e6ac4d8d3c2572eab3e5b721e0520656699b5b2e49e12f51cc52ef41d7ac5e6f
-size 2770836
diff --git a/papers/1-s2.0-S0950061820330786-main.pdf b/papers/1-s2.0-S0950061820330786-main.pdf
deleted file mode 100644
index c4d3c31edb297d2215ee2cb2ce55a2fc3fbf4afc..0000000000000000000000000000000000000000
--- a/papers/1-s2.0-S0950061820330786-main.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3e0545545fe157b4b451f27645fc3b948179d592a82d69a0162cc68316799c3f
-size 7895635
diff --git a/papers/1-s2.0-S1359836816316882-main.pdf b/papers/1-s2.0-S1359836816316882-main.pdf
deleted file mode 100644
index d16466f567f0ce4db28556fa575997c1aa5e272c..0000000000000000000000000000000000000000
--- a/papers/1-s2.0-S1359836816316882-main.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fac05273a94954a02f1b7f78a8a2dc48965e6dff8d2417804284df5d5ebf2cc7
-size 993983
diff --git a/papers/1-s2.0-S2090447920301593-main.pdf b/papers/1-s2.0-S2090447920301593-main.pdf
deleted file mode 100644
index 23eb21df1a1f24b3e58398ea2e2e7f4ddbe3ebdc..0000000000000000000000000000000000000000
--- a/papers/1-s2.0-S2090447920301593-main.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0811c3ff0f36a2e53819abdd70aab63a47735cf157e081be31a1a0b7fd9a2290
-size 2639742
diff --git a/papers/2011-EffectofSpecimenSizeonStaticStrengthandDIFofHSCfromSHPBTest.pdf b/papers/2011-EffectofSpecimenSizeonStaticStrengthandDIFofHSCfromSHPBTest.pdf
deleted file mode 100644
index 5a48d79b23de8e77717bb74e98bc69e35bbeb574..0000000000000000000000000000000000000000
--- a/papers/2011-EffectofSpecimenSizeonStaticStrengthandDIFofHSCfromSHPBTest.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bfe41da8fd83964ccc2d63a44cde66663191f0ceec5da19d8ab714571f31e1d0
-size 902749
diff --git a/papers/Capacitance-based stress self-sensing in cement paste without requiring any admixture.pdf b/papers/Capacitance-based stress self-sensing in cement paste without requiring any admixture.pdf
deleted file mode 100644
index 1d28e804c00bbafdb58624f622977075f4dbc322..0000000000000000000000000000000000000000
--- a/papers/Capacitance-based stress self-sensing in cement paste without requiring any admixture.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:91c43a579673112bc4fd4c779e032998854eda1a83cbb52995da1b08cb8a3fbb
-size 2607121
diff --git a/papers/Capacitive compressive stress self-sensing behavior of cement mortar and its dependence on the thickness.pdf b/papers/Capacitive compressive stress self-sensing behavior of cement mortar and its dependence on the thickness.pdf
deleted file mode 100644
index f386e12298737ad37e9926a6b4196cb8cde2e467..0000000000000000000000000000000000000000
--- a/papers/Capacitive compressive stress self-sensing behavior of cement mortar and its dependence on the thickness.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:10cb37f750e10da02dc2683fac6e0cc21792146f41f043ca421ac485bb78b90e
-size 1053149
diff --git a/papers/Development of self-sensing ultra-high-performance concrete using hybrid carbon black and carbon nanofibers.pdf b/papers/Development of self-sensing ultra-high-performance concrete using hybrid carbon black and carbon nanofibers.pdf
deleted file mode 100644
index 39cdbffff0f1be34799739f90a9cb76d20b3d290..0000000000000000000000000000000000000000
--- a/papers/Development of self-sensing ultra-high-performance concrete using hybrid carbon black and carbon nanofibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7038811667d71f1d2dbb5d22c17310ea10b45c1112a4609913bc2003fa69b560
-size 18592856
diff --git a/papers/Development of sensing concrete Principles, properties and its applications.pdf b/papers/Development of sensing concrete Principles, properties and its applications.pdf
deleted file mode 100644
index ebd342880ce37249ad17f1548c1eab90cf493c4e..0000000000000000000000000000000000000000
--- a/papers/Development of sensing concrete Principles, properties and its applications.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:99231674c2f181ba902eddb435422e60fd2aad7b6f0dee8586caf65ffa9e8434
-size 4935899
diff --git a/papers/EVALUA~1.PDF b/papers/EVALUA~1.PDF
deleted file mode 100644
index e490e55389d9a5472f7ecd1b55006be796703296..0000000000000000000000000000000000000000
--- a/papers/EVALUA~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a17dc91f53a82741e12c8711c992d8193fc891c2aac5a005635d6bb21832323e
-size 3449663
diff --git a/papers/Effect of silane treatment on microstructure of sisal fibers.pdf b/papers/Effect of silane treatment on microstructure of sisal fibers.pdf
deleted file mode 100644
index bbae93d075ad75530419cc5600e286be1e00e0f8..0000000000000000000000000000000000000000
--- a/papers/Effect of silane treatment on microstructure of sisal fibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:14e24a7b5089fa8b0fcba20f929ffb0ad8a51d76c7b62dd9a8e793a2dd746bef
-size 1767808
diff --git a/papers/Graphene family (GFMs), carbon nanotubes (CNTs) and carbon black (CB) on smart materials for civil construction.pdf b/papers/Graphene family (GFMs), carbon nanotubes (CNTs) and carbon black (CB) on smart materials for civil construction.pdf
deleted file mode 100644
index ecec02baef99f0c6049f503081ac7ab9599e1413..0000000000000000000000000000000000000000
--- a/papers/Graphene family (GFMs), carbon nanotubes (CNTs) and carbon black (CB) on smart materials for civil construction.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:06cf6a6f7ae59ff9f4e8cc253af7022d43096e1d86a9334c87f13198f3300989
-size 3325137
diff --git a/papers/Influence of the structures of polycarboxylate superplasticizer on its performance in cement-based materials-A review.pdf b/papers/Influence of the structures of polycarboxylate superplasticizer on its performance in cement-based materials-A review.pdf
deleted file mode 100644
index c7e137ba135a3dc288fc36fb58c68a0c29ff36b8..0000000000000000000000000000000000000000
--- a/papers/Influence of the structures of polycarboxylate superplasticizer on its performance in cement-based materials-A review.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5594e415ae5beb8962fd0f915f2d9326017c8c927ce01ab947525ce2d27d194e
-size 2319864
diff --git a/papers/Investigating the synergistic effects of carbon fiber and silica fume on concrete strength and eco-efficiency.pdf b/papers/Investigating the synergistic effects of carbon fiber and silica fume on concrete strength and eco-efficiency.pdf
deleted file mode 100644
index d24739aa85e95def58110c2773162c4113964307..0000000000000000000000000000000000000000
--- a/papers/Investigating the synergistic effects of carbon fiber and silica fume on concrete strength and eco-efficiency.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6300a5c9d8e56577739677a3d6fb76bc83794c2e26433e3bee134c6aa96419f5
-size 8796244
diff --git a/papers/Investigation of 3D Printed Self-Sensing UHPC Composites Using Graphite and Hybrid Carbon Microfibers.pdf b/papers/Investigation of 3D Printed Self-Sensing UHPC Composites Using Graphite and Hybrid Carbon Microfibers.pdf
deleted file mode 100644
index ba84aef5b77385c3bbb00d9847644fe98d5a3c27..0000000000000000000000000000000000000000
--- a/papers/Investigation of 3D Printed Self-Sensing UHPC Composites Using Graphite and Hybrid Carbon Microfibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:76a51ea3c14556d9e0816f7bf1a1081c96fecafeaec6318e478256046004c403
-size 19966500
diff --git a/papers/Ozone treatment of carbon fiber for reinforcing cement.pdf b/papers/Ozone treatment of carbon fiber for reinforcing cement.pdf
deleted file mode 100644
index bf27ba64a370ecca63df52a66fcefbeff174ca4d..0000000000000000000000000000000000000000
--- a/papers/Ozone treatment of carbon fiber for reinforcing cement.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1a780e58eeb5fac9eb52da3d8e1b22836eb0efeede7e0c24a34f03f78f3e543a
-size 158724
diff --git a/papers/PIEZOE~1.PDF b/papers/PIEZOE~1.PDF
deleted file mode 100644
index f610260d06c5ed2952a157b5e0c4d9755dde5cb2..0000000000000000000000000000000000000000
--- a/papers/PIEZOE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b29bdceed88bf961874d5df014ab286e20408a7db568dbf81031d7062cfc0aa3
-size 2799712
diff --git a/papers/Performance of silica fume slurry treated recycled aggregate concrete reinforced with carbon fibers.pdf b/papers/Performance of silica fume slurry treated recycled aggregate concrete reinforced with carbon fibers.pdf
deleted file mode 100644
index 84a2b710fe7cb7370f81d147b622904ec9b65cf0..0000000000000000000000000000000000000000
--- a/papers/Performance of silica fume slurry treated recycled aggregate concrete reinforced with carbon fibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9b7113d7790e508928c28f5c19646c5ec746d158fd069806f6519b2fa2fb17f9
-size 6511841
diff --git a/papers/Piezopermittivity for capacitance-based strain stress sensing.pdf b/papers/Piezopermittivity for capacitance-based strain stress sensing.pdf
deleted file mode 100644
index 60c0b24dfa8365f1dc34d56f09a904e91daa390e..0000000000000000000000000000000000000000
--- a/papers/Piezopermittivity for capacitance-based strain stress sensing.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:686a01889e91d7914752144928985ba9c6eb4ea64f4e31272ced5703533f0b3b
-size 8547318
diff --git a/papers/Review Improving cement-based materials by using silica fume.pdf b/papers/Review Improving cement-based materials by using silica fume.pdf
deleted file mode 100644
index 2ecf709c55f322e1a310292e6b3d3239d1173743..0000000000000000000000000000000000000000
--- a/papers/Review Improving cement-based materials by using silica fume.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d3b067125bf3d799e0d5cfd92293d7a619bd9c160b99f764866e6780c1168f7d
-size 130361
diff --git a/papers/Revolutionizing infrastructure The evolving landscape of electricity-based multifunctional concrete from concept to practice.pdf b/papers/Revolutionizing infrastructure The evolving landscape of electricity-based multifunctional concrete from concept to practice.pdf
deleted file mode 100644
index 6abbcedb55722ef7d65de4f54b5f35cfdb135d63..0000000000000000000000000000000000000000
--- a/papers/Revolutionizing infrastructure The evolving landscape of electricity-based multifunctional concrete from concept to practice.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b6df06b979a5e5655dc6ce6a7b1d2df44fefa7343e85060871b58835eb380a28
-size 51623146
diff --git a/papers/S1-An-experimental-study-of-self-sensing-concrete-enhanced_2020_Construction-an.pdf b/papers/S1-An-experimental-study-of-self-sensing-concrete-enhanced_2020_Construction-an.pdf
deleted file mode 100644
index d10c90246a283ce3607877cb08f679435ac9fe8a..0000000000000000000000000000000000000000
--- a/papers/S1-An-experimental-study-of-self-sensing-concrete-enhanced_2020_Construction-an.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b68187d8c4614c3e241bbb4c89e8c14d744533b18f63834a3d26f599a569fcb5
-size 10170858
diff --git a/papers/S10-Enhancing-self-stress-sensing-ability-of-smart-ultra-high_2021_Journal-of-Bu.pdf b/papers/S10-Enhancing-self-stress-sensing-ability-of-smart-ultra-high_2021_Journal-of-Bu.pdf
deleted file mode 100644
index 22c743f166b5e6734173dcf4b663f8c6aed5961c..0000000000000000000000000000000000000000
--- a/papers/S10-Enhancing-self-stress-sensing-ability-of-smart-ultra-high_2021_Journal-of-Bu.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bab3678971e41461f6f0d19678d0c93b31b9d6c8523d45b2cdfaea9dc84b5751
-size 12180099
diff --git a/papers/S100-C~1.PDF b/papers/S100-C~1.PDF
deleted file mode 100644
index 47451f48d5b8d9e1541b0787b5c4d2c44928eefb..0000000000000000000000000000000000000000
--- a/papers/S100-C~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c4c288018725ff22661b823c066bad8fb7d0f871cfc74c39cabee284b22a684e
-size 16436378
diff --git a/papers/S11-Environment-Friendly, Self-Sensing Concrete Blended with Byproduct Wastes.pdf b/papers/S11-Environment-Friendly, Self-Sensing Concrete Blended with Byproduct Wastes.pdf
deleted file mode 100644
index 95d93ad70e55cefcd58393ba8646d502a2551fe7..0000000000000000000000000000000000000000
--- a/papers/S11-Environment-Friendly, Self-Sensing Concrete Blended with Byproduct Wastes.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0de399fce2dfc1ea5b910ccaf28c466847908bf0f19fde5818dba1d383dba17e
-size 4414928
diff --git a/papers/S12-Hybrid-effects-of-steel-fiber-and-carbon-nanotube-on-s_2018_Construction-and.pdf b/papers/S12-Hybrid-effects-of-steel-fiber-and-carbon-nanotube-on-s_2018_Construction-and.pdf
deleted file mode 100644
index 45b28b8b9d766fc005a9971a415734fe0f73887b..0000000000000000000000000000000000000000
--- a/papers/S12-Hybrid-effects-of-steel-fiber-and-carbon-nanotube-on-s_2018_Construction-and.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0219166e4a61d8e1bb036e7a3d0eb64d09f0f2eebbed1c051c123b2ae0d1c9be
-size 6352700
diff --git a/papers/S13-Increasing-self-sensing-capability-of-carbon-nanotubes-c_2020_Construction-a.pdf b/papers/S13-Increasing-self-sensing-capability-of-carbon-nanotubes-c_2020_Construction-a.pdf
deleted file mode 100644
index 9fce6aa183b727b541045742692da81cc3b419c4..0000000000000000000000000000000000000000
--- a/papers/S13-Increasing-self-sensing-capability-of-carbon-nanotubes-c_2020_Construction-a.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2b6961eb33c2dc1945e80cb424ca0e60be831739795c3d3ed861debd4bc47c00
-size 2491685
diff --git a/papers/S14-Influence-of-carbon-nanofiber-content-and-sodium-chloride-_2019_Case-Studies.pdf b/papers/S14-Influence-of-carbon-nanofiber-content-and-sodium-chloride-_2019_Case-Studies.pdf
deleted file mode 100644
index 9dc26cf77fccb60b30e696b564c79c241d0d40d9..0000000000000000000000000000000000000000
--- a/papers/S14-Influence-of-carbon-nanofiber-content-and-sodium-chloride-_2019_Case-Studies.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e8a467d09713940de2b53cf79a2558aedcb8f88e99396304bd18324ea75e9fbf
-size 1429796
diff --git a/papers/S15-Influence-of-water-ingress-on-the-electrical-properties-_2021_Journal-of-Bui.pdf b/papers/S15-Influence-of-water-ingress-on-the-electrical-properties-_2021_Journal-of-Bui.pdf
deleted file mode 100644
index ace9fd27547903862d9e94c07b90e5849ccd5906..0000000000000000000000000000000000000000
--- a/papers/S15-Influence-of-water-ingress-on-the-electrical-properties-_2021_Journal-of-Bui.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:dc378192f5970beb777212a40e11edc194c88d0d014b6a4c23388dd350a7c05e
-size 8114891
diff --git a/papers/S16-Investigations-on-scalable-fabrication-procedures-for-sel_2016_Cement-and-Co.pdf b/papers/S16-Investigations-on-scalable-fabrication-procedures-for-sel_2016_Cement-and-Co.pdf
deleted file mode 100644
index 3e4461fd91d0e89955f73eb65260402bdbfed3e0..0000000000000000000000000000000000000000
--- a/papers/S16-Investigations-on-scalable-fabrication-procedures-for-sel_2016_Cement-and-Co.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c019a8649804527c6f6946f0630958baafa168c30c3a7fad8ac1714f5d83af00
-size 3699381
diff --git a/papers/S17-Cross tension and compression loading and large-scale testing of strain and damage sensing smart concrete.pdf b/papers/S17-Cross tension and compression loading and large-scale testing of strain and damage sensing smart concrete.pdf
deleted file mode 100644
index f92b22af330bc9bd79cad87e04d403b1edd73a47..0000000000000000000000000000000000000000
--- a/papers/S17-Cross tension and compression loading and large-scale testing of strain and damage sensing smart concrete.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8a3f2ace2a355e9ad3fe8f7a8509752295d16f5254b5ddb26e1e063b0fadfce3
-size 12549353
diff --git a/papers/S18-Nano graphite platelets-enabled piezoresistive cementitious composites for structural health monitoring.pdf b/papers/S18-Nano graphite platelets-enabled piezoresistive cementitious composites for structural health monitoring.pdf
deleted file mode 100644
index 496aeaa5a500e27db1dc84b25e365137face1253..0000000000000000000000000000000000000000
--- a/papers/S18-Nano graphite platelets-enabled piezoresistive cementitious composites for structural health monitoring.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1b6351f0d89ef05de0842a767ca3d185144071d09703518c511a55a32730f6b7
-size 6955295
diff --git a/papers/S19-Self-sensing-piezoresistive-cement-composite-loaded_2017_Cement-and-Concrete.pdf b/papers/S19-Self-sensing-piezoresistive-cement-composite-loaded_2017_Cement-and-Concrete.pdf
deleted file mode 100644
index f9d384c3236b536d9c6cf3cba8cea215191352fa..0000000000000000000000000000000000000000
--- a/papers/S19-Self-sensing-piezoresistive-cement-composite-loaded_2017_Cement-and-Concrete.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0b89c68444198a3125bc36d7d7ad895c85679378ddd950574e941f4482cc56b0
-size 1291076
diff --git a/papers/S2-Characterization-of-smart-brass-fiber-reinforced-co_2020_Construction-and-Bu.pdf b/papers/S2-Characterization-of-smart-brass-fiber-reinforced-co_2020_Construction-and-Bu.pdf
deleted file mode 100644
index 95c15eec658df9789a7b1826c32e19dfe71c73c7..0000000000000000000000000000000000000000
--- a/papers/S2-Characterization-of-smart-brass-fiber-reinforced-co_2020_Construction-and-Bu.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c573ef904178659e66b169c74a6cbd7805e09145deceeb5cd447863817f42895
-size 3456970
diff --git a/papers/S20-IN~1.PDF b/papers/S20-IN~1.PDF
deleted file mode 100644
index aee9e7b6d4e36e05be05fd12642e73005b875ddb..0000000000000000000000000000000000000000
--- a/papers/S20-IN~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ef0dbea7d457fa02864341d1690484c47dbd39ab0a1b7a85062ce1640e907371
-size 1178272
diff --git a/papers/S21-Mechanical, electrical and self-sensing properties of cementitious mortars containing short carbon fibers.pdf b/papers/S21-Mechanical, electrical and self-sensing properties of cementitious mortars containing short carbon fibers.pdf
deleted file mode 100644
index ec6f18816481119cbb3c3394116673216c444d5c..0000000000000000000000000000000000000000
--- a/papers/S21-Mechanical, electrical and self-sensing properties of cementitious mortars containing short carbon fibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:684a75200bebe7438346021f784154f769d6b61275f0268fd970f42c5ad467e2
-size 916061
diff --git a/papers/S22-Improved strain sensing properties of cement-based sensors through enhanced carbon nanotube dispersion.pdf b/papers/S22-Improved strain sensing properties of cement-based sensors through enhanced carbon nanotube dispersion.pdf
deleted file mode 100644
index 57aa6949fd504466d2fd1db2e957257b7ab2a1bf..0000000000000000000000000000000000000000
--- a/papers/S22-Improved strain sensing properties of cement-based sensors through enhanced carbon nanotube dispersion.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e596ce613b5af3083c9738328c5aeb85d6c950751ace1fdfedd695044b25db26
-size 7881761
diff --git a/papers/S23-Increasing self-sensing capability of carbon nanotubes cement-based materials by simultaneous addition of Ni nanofibers.pdf b/papers/S23-Increasing self-sensing capability of carbon nanotubes cement-based materials by simultaneous addition of Ni nanofibers.pdf
deleted file mode 100644
index f8145ed8fa21e3cb75862598bc562dabd92b7f8f..0000000000000000000000000000000000000000
--- a/papers/S23-Increasing self-sensing capability of carbon nanotubes cement-based materials by simultaneous addition of Ni nanofibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b11d51d6ed34e67eb268940b8389bf678e2387474c4e38b23c66214789132d37
-size 2491685
diff --git a/papers/S24-Multifunctional-self-sensing-and-ductile-cementit_2019_Cement-and-Concrete-R.pdf b/papers/S24-Multifunctional-self-sensing-and-ductile-cementit_2019_Cement-and-Concrete-R.pdf
deleted file mode 100644
index e56bf4c006aab86439974470d5a975916898fb9f..0000000000000000000000000000000000000000
--- a/papers/S24-Multifunctional-self-sensing-and-ductile-cementit_2019_Cement-and-Concrete-R.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e3f581bb63eff732f22b0019ea8cdb495dae35b6c6b7aae88a9b127efb34abcb
-size 16496962
diff --git a/papers/S25-Self-sensing-capability-of-ultra-high-performance-concr_2018_Sensors-and-Act.pdf b/papers/S25-Self-sensing-capability-of-ultra-high-performance-concr_2018_Sensors-and-Act.pdf
deleted file mode 100644
index 6133383228fe477d3aa4a51b2529610af5e39219..0000000000000000000000000000000000000000
--- a/papers/S25-Self-sensing-capability-of-ultra-high-performance-concr_2018_Sensors-and-Act.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:681f62bb383c1466a88694f215a0b0575c1094ffe8be40fe865105b987e38d0f
-size 5220733
diff --git a/papers/S26-TE~1.PDF b/papers/S26-TE~1.PDF
deleted file mode 100644
index 42ecc7271cbc4279ff2667d29f0176ceddb049ec..0000000000000000000000000000000000000000
--- a/papers/S26-TE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:456f19cca981522e080236b4552cc96970f0cdd2342938d99e06cc1b00ab8e61
-size 2185689
diff --git a/papers/S27-Effect of aspect ratio on strain sensing capacity of carbon fiber reinforced cement composites.pdf b/papers/S27-Effect of aspect ratio on strain sensing capacity of carbon fiber reinforced cement composites.pdf
deleted file mode 100644
index bba281eef38744cd22442658f339d55ddd79bea7..0000000000000000000000000000000000000000
--- a/papers/S27-Effect of aspect ratio on strain sensing capacity of carbon fiber reinforced cement composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fe60fd559cc6f743e238a520b680d0d02bb555933328a5a6c0cf01ea9fd0aaa4
-size 2781671
diff --git "a/papers/S28-Smart Graphite\342\200\223Cement Composites with Low Percolation Threshold.pdf" "b/papers/S28-Smart Graphite\342\200\223Cement Composites with Low Percolation Threshold.pdf"
deleted file mode 100644
index f9c3968c98ace039f24f95e5555185adea767aab..0000000000000000000000000000000000000000
--- "a/papers/S28-Smart Graphite\342\200\223Cement Composites with Low Percolation Threshold.pdf"
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5f8238daf3fc5e20e13de68491a4c58d64253d40ced2d96b7cbe491c05cddfe2
-size 5383561
diff --git a/papers/S29-Hybrid Carbon Microfibers-Graphite Fillers for Piezoresistive Cementitious Composites.pdf b/papers/S29-Hybrid Carbon Microfibers-Graphite Fillers for Piezoresistive Cementitious Composites.pdf
deleted file mode 100644
index 4a23c502d384f9ea5e9d2a0d04f0e3d8ab04c199..0000000000000000000000000000000000000000
--- a/papers/S29-Hybrid Carbon Microfibers-Graphite Fillers for Piezoresistive Cementitious Composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9b35eaed680f105a0d35fd4b5f704552d9b9dddfbf491871bbbb70fd237da632
-size 15621213
diff --git a/papers/S3-Effect of characteristics of assembly unit of CNTNCB composite fillers on properties of smart cement-based materials.pdf b/papers/S3-Effect of characteristics of assembly unit of CNTNCB composite fillers on properties of smart cement-based materials.pdf
deleted file mode 100644
index e523244169485e532e56b590f79ec466cad04313..0000000000000000000000000000000000000000
--- a/papers/S3-Effect of characteristics of assembly unit of CNTNCB composite fillers on properties of smart cement-based materials.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7bc5d4db3e5f2048a09afcab1e919041bef9ba87abbfac7dd287e14bae6648ac
-size 2216621
diff --git "a/papers/S30-Smart Graphite\342\200\223Cement Composite for Roadway-Integrated Weigh-In-Motion Sensing.pdf" "b/papers/S30-Smart Graphite\342\200\223Cement Composite for Roadway-Integrated Weigh-In-Motion Sensing.pdf"
deleted file mode 100644
index b7ca6044bf061da81400b5a5d7af958eb2eac9f0..0000000000000000000000000000000000000000
--- "a/papers/S30-Smart Graphite\342\200\223Cement Composite for Roadway-Integrated Weigh-In-Motion Sensing.pdf"
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0ed37d39cd118e46bf7cd584630809651e0e0141959c007bed1421714d78fb25
-size 4501952
diff --git a/papers/S31-Electrical and piezoresistive properties of carbon nanofiber cement mortar under different temperatures and water contents.pdf b/papers/S31-Electrical and piezoresistive properties of carbon nanofiber cement mortar under different temperatures and water contents.pdf
deleted file mode 100644
index a48543bacb8e9fb3e5a7dd065ee6242de4ba6157..0000000000000000000000000000000000000000
--- a/papers/S31-Electrical and piezoresistive properties of carbon nanofiber cement mortar under different temperatures and water contents.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3878aaec38014e661699ac35799ca5706d9691904447dd00f17b2eb96ddef797
-size 2494350
diff --git a/papers/S32-Self-stress-sensing-smart-concrete-containing-fine-stee_2019_Construction-an.pdf b/papers/S32-Self-stress-sensing-smart-concrete-containing-fine-stee_2019_Construction-an.pdf
deleted file mode 100644
index 1f11228948a313805a9fc384883a8c8ac62313d8..0000000000000000000000000000000000000000
--- a/papers/S32-Self-stress-sensing-smart-concrete-containing-fine-stee_2019_Construction-an.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:01fbf8494ede6c79a8059f9fb803a8b035e6cc57ebce60b06e9d8cc3a9e0c7c0
-size 2891716
diff --git a/papers/S33-IN~1.PDF b/papers/S33-IN~1.PDF
deleted file mode 100644
index 6a453d67305de4f94dc46d00dc69d431894f4d73..0000000000000000000000000000000000000000
--- a/papers/S33-IN~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1b13647e62737a75aa0efe9530eec7bf4abfd366d950057f6178627a1f2d74c8
-size 4810677
diff --git a/papers/S34-Self-sensing-ultra-high-performance-concrete-fo_2021_Sensors-and-Actuators-A.pdf b/papers/S34-Self-sensing-ultra-high-performance-concrete-fo_2021_Sensors-and-Actuators-A.pdf
deleted file mode 100644
index 7e266f3707b447af4f4d60b90010c0377e0e7879..0000000000000000000000000000000000000000
--- a/papers/S34-Self-sensing-ultra-high-performance-concrete-fo_2021_Sensors-and-Actuators-A.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fd9f95a5b0f854fb4da5964bdcbd57ce5b81c5c4eadd3de47fa39ee0c90ff1e5
-size 11046774
diff --git a/papers/S35-EL~1.PDF b/papers/S35-EL~1.PDF
deleted file mode 100644
index 450b9ae1567aa8766db45b4d8eb0c6814c619658..0000000000000000000000000000000000000000
--- a/papers/S35-EL~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fa000dede202534188dadd6361612168e8d4040dd55bf8862835f33a88ebb084
-size 3281717
diff --git a/papers/S36-Piezoresistivity enhancement of functional carbon black filled cement-based sensor using polypropylene fibre.pdf b/papers/S36-Piezoresistivity enhancement of functional carbon black filled cement-based sensor using polypropylene fibre.pdf
deleted file mode 100644
index 84e81a51c929791f79fd6ef0710d93ffc215a645..0000000000000000000000000000000000000000
--- a/papers/S36-Piezoresistivity enhancement of functional carbon black filled cement-based sensor using polypropylene fibre.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:dc619543ea0110ae81eac967e7d62dd9c0e0fea4e842946551031d507786d9a1
-size 3402311
diff --git a/papers/S37-Test and Study on Electrical Property of Conductive Concrete.pdf b/papers/S37-Test and Study on Electrical Property of Conductive Concrete.pdf
deleted file mode 100644
index 67be8d10ae1cd3a130aa15913db362330516df69..0000000000000000000000000000000000000000
--- a/papers/S37-Test and Study on Electrical Property of Conductive Concrete.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:55d6fee14f13e49c8edbd2cfbe8bcc016263530fc29ba258dafb6dfbb0f15d1d
-size 345527
diff --git a/papers/S38 - Electrical-resistance-based Sensing of Impact Damage in Carbon Fiber Reinforced Cement-based Materials.pdf b/papers/S38 - Electrical-resistance-based Sensing of Impact Damage in Carbon Fiber Reinforced Cement-based Materials.pdf
deleted file mode 100644
index 2feb9c8b83091873c00ba85b5447f48720232a59..0000000000000000000000000000000000000000
--- a/papers/S38 - Electrical-resistance-based Sensing of Impact Damage in Carbon Fiber Reinforced Cement-based Materials.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b9cba6b99438bedca78e87a9eaabf72311ed0f31d6f7e807e8bd034b6a0cfd4e
-size 1144006
diff --git a/papers/S39 - Electrical conductivity of self-monitoring CFRC.pdf b/papers/S39 - Electrical conductivity of self-monitoring CFRC.pdf
deleted file mode 100644
index df3ef46c428324d4f364e55332a1185c666ada10..0000000000000000000000000000000000000000
--- a/papers/S39 - Electrical conductivity of self-monitoring CFRC.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:927c836fb22819631550117acea439cf65511b5301cf86dabc19e5681df70bc6
-size 484510
diff --git a/papers/S4-Effect-of-steel-fiber-and-carbon-black-on-the-self-s_2019_Construction-and-B.pdf b/papers/S4-Effect-of-steel-fiber-and-carbon-black-on-the-self-s_2019_Construction-and-B.pdf
deleted file mode 100644
index 7a1428009915dcb3c178ad4cac36922b47e0878a..0000000000000000000000000000000000000000
--- a/papers/S4-Effect-of-steel-fiber-and-carbon-black-on-the-self-s_2019_Construction-and-B.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2af1b1251bc995bb216cd1183e0f1ac113eb35ae249c3887f976e70777384e3c
-size 2106394
diff --git a/papers/S40 - Resistance Changes during Compression of Carbon Fiber Cement COmposites.pdf b/papers/S40 - Resistance Changes during Compression of Carbon Fiber Cement COmposites.pdf
deleted file mode 100644
index c85aa9b13457867c7f8b4f0c25b24223456ea33e..0000000000000000000000000000000000000000
--- a/papers/S40 - Resistance Changes during Compression of Carbon Fiber Cement COmposites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f6df2d01458623bfe82d7d55654632aa38869bd79f5e3453d68632e285119175
-size 172099
diff --git a/papers/S41 - Electrical-resistance-based damage self-sensing in carbon fiber reinforced cement.pdf b/papers/S41 - Electrical-resistance-based damage self-sensing in carbon fiber reinforced cement.pdf
deleted file mode 100644
index 0cefaa6ce1df40eb36bb7ad9da0163af207e037e..0000000000000000000000000000000000000000
--- a/papers/S41 - Electrical-resistance-based damage self-sensing in carbon fiber reinforced cement.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1d7e484910fbc22ffc217fd9c884eb63a6b26f036f1f23e6891e3868da5499c1
-size 297608
diff --git a/papers/S42-SE~1.PDF b/papers/S42-SE~1.PDF
deleted file mode 100644
index 9b0d83c9794a8d020d5f5611297623d12a2f8455..0000000000000000000000000000000000000000
--- a/papers/S42-SE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d97aabe9f510a72bea35a3e1a0263b88325b7def5c35e67b7e783c61dbd26d1b
-size 2262482
diff --git a/papers/S43 - the 100th anniversary of the four-point probe technique the role of probe geometries in isotropic andanisotropic systems.pdf b/papers/S43 - the 100th anniversary of the four-point probe technique the role of probe geometries in isotropic andanisotropic systems.pdf
deleted file mode 100644
index c8cbee04f443e6090e72dd27b8553c8a138ddf2d..0000000000000000000000000000000000000000
--- a/papers/S43 - the 100th anniversary of the four-point probe technique the role of probe geometries in isotropic andanisotropic systems.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f241ab0c1bb02fc43e7038621681b75060be8eb700673c5858cadc1eb5a09d02
-size 4760235
diff --git a/papers/S44-Sensing performance of engineered cementitious composites in different application forms.pdf b/papers/S44-Sensing performance of engineered cementitious composites in different application forms.pdf
deleted file mode 100644
index 18b0ec99400d60e179d68b03b54e2ec80dfbd1eb..0000000000000000000000000000000000000000
--- a/papers/S44-Sensing performance of engineered cementitious composites in different application forms.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d192b5cd71c35b7462fc4466f51c42ade64042f5f75c4f71bd18b67361571997
-size 8149947
diff --git a/papers/S45-Insitu synthesizing carbon nanotubes on cement to develop self-sensing cementitious composites.pdf b/papers/S45-Insitu synthesizing carbon nanotubes on cement to develop self-sensing cementitious composites.pdf
deleted file mode 100644
index 895f29a9bc0c24f94797340fa7e71c0a1886b104..0000000000000000000000000000000000000000
--- a/papers/S45-Insitu synthesizing carbon nanotubes on cement to develop self-sensing cementitious composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:21c282c9fdbcd70d956b50e72e323b12e3664ffe8a5f882b5cf33abcb2f30aef
-size 16655167
diff --git a/papers/S46-SE~1.PDF b/papers/S46-SE~1.PDF
deleted file mode 100644
index 92d732bfb87f6c6c9c81e6a230e8e8e97b939505..0000000000000000000000000000000000000000
--- a/papers/S46-SE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:647ee6e4db299b3812004a4fe47643dba1eb13d2e4ba713b3a21736c27a53828
-size 7595892
diff --git a/papers/S47-The applicability of shungite as an electrically conductive additive in cement composites.pdf b/papers/S47-The applicability of shungite as an electrically conductive additive in cement composites.pdf
deleted file mode 100644
index dae42434eeaa32c003738d445bb708a2428450b1..0000000000000000000000000000000000000000
--- a/papers/S47-The applicability of shungite as an electrically conductive additive in cement composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3db0ff47efa70e83188b4823f78cec1099a9d8a65ab698a7f9d160acb42bad8a
-size 9148635
diff --git a/papers/S48-Self-sensing properties and piezoresistive effect of high ductility cementitious composite.pdf b/papers/S48-Self-sensing properties and piezoresistive effect of high ductility cementitious composite.pdf
deleted file mode 100644
index 0b4874f33acaffa4c454d43e5384c13e30322e0a..0000000000000000000000000000000000000000
--- a/papers/S48-Self-sensing properties and piezoresistive effect of high ductility cementitious composite.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:323fcdcd00477e72105ea7e0e99f031af7b0d39bed625036adf2c73c1b62ef29
-size 9069946
diff --git a/papers/S49-ME~1.PDF b/papers/S49-ME~1.PDF
deleted file mode 100644
index 2897fc435461fb1e83d26af57851d14900cfd831..0000000000000000000000000000000000000000
--- a/papers/S49-ME~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5a3e33eda0bc0146e4b98cfe50f4946aaacaf47deef7ac56bd4c7909912beb34
-size 9410510
diff --git a/papers/S5-Effects-of-carbon-nanomaterial-type-and-amount-on-self-sensing-_2019_Measure.pdf b/papers/S5-Effects-of-carbon-nanomaterial-type-and-amount-on-self-sensing-_2019_Measure.pdf
deleted file mode 100644
index 549416d2b336e4afb0b9f90eb1ad35efd37db1d8..0000000000000000000000000000000000000000
--- a/papers/S5-Effects-of-carbon-nanomaterial-type-and-amount-on-self-sensing-_2019_Measure.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e0f92834b7e7c7b141c36f93d9603e4da749ce56a26765cf1cdfc5f27a6eb233
-size 3438648
diff --git a/papers/S50-IM~1.PDF b/papers/S50-IM~1.PDF
deleted file mode 100644
index 049ebf4418039a4cad7af47688474f071ee7ad0e..0000000000000000000000000000000000000000
--- a/papers/S50-IM~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3dc9e6448288ef12a9451f3b37b46de51f483cd7552ae9828f105431f85b9002
-size 12167648
diff --git a/papers/S51-Electrical and piezoresistive properties of cement composites with carbon nanomaterials.pdf b/papers/S51-Electrical and piezoresistive properties of cement composites with carbon nanomaterials.pdf
deleted file mode 100644
index ae1b83acbb5965ddacd0dc659644ea5acdfb5c98..0000000000000000000000000000000000000000
--- a/papers/S51-Electrical and piezoresistive properties of cement composites with carbon nanomaterials.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c4a79071893965522d2017e0d532471b8502119639d64862beb60006466edd49
-size 1854828
diff --git a/papers/S52-Influences of (MCNT) fraction, moisture, stressstrain level on the electrical properties of MCNT of cement-based composites.pdf b/papers/S52-Influences of (MCNT) fraction, moisture, stressstrain level on the electrical properties of MCNT of cement-based composites.pdf
deleted file mode 100644
index caab0a1fea82186829c4838451b9bc4284d1aa51..0000000000000000000000000000000000000000
--- a/papers/S52-Influences of (MCNT) fraction, moisture, stressstrain level on the electrical properties of MCNT of cement-based composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b7fb6152e90b7de7ccf37d9fb262b507246526159d510c01bd6a58ec8070beaf
-size 3773954
diff --git a/papers/S53-CA~1.PDF b/papers/S53-CA~1.PDF
deleted file mode 100644
index ca01cac46c2e3bb9d6c02bd9ba4dd7518adfc997..0000000000000000000000000000000000000000
--- a/papers/S53-CA~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:01aad2e3a0f9e98b4599d879163faadcf6bd7c1e8e162fe73d5daf81c613f0d7
-size 7536503
diff --git a/papers/S54-Carbon Nanofibers Grown in CaO for Self-Sensing in Mortar.pdf b/papers/S54-Carbon Nanofibers Grown in CaO for Self-Sensing in Mortar.pdf
deleted file mode 100644
index a54cd0bb1e44318d1d5504c6951a2ddb80ba80d5..0000000000000000000000000000000000000000
--- a/papers/S54-Carbon Nanofibers Grown in CaO for Self-Sensing in Mortar.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:54cbd2266b42fe87a2bf7c325a711341d3dc7da8c18e7e8ad12478eeaba1d4b7
-size 8000147
diff --git a/papers/S55-Electro-mechanical self-sensing response of ultra-high-performance fiber-reinforced concrete in tension.pdf b/papers/S55-Electro-mechanical self-sensing response of ultra-high-performance fiber-reinforced concrete in tension.pdf
deleted file mode 100644
index b67eee80fdc1d10c67431cff70831b8d57d37ffb..0000000000000000000000000000000000000000
--- a/papers/S55-Electro-mechanical self-sensing response of ultra-high-performance fiber-reinforced concrete in tension.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3bdc486621b4eee252edef94861e7deaabd92c5c754e9f75a8d968836574887c
-size 2754170
diff --git a/papers/S55-Nanocarbon black-based ultra-high-performance concrete (UHPC) with self-strain sensing capability.pdf b/papers/S55-Nanocarbon black-based ultra-high-performance concrete (UHPC) with self-strain sensing capability.pdf
deleted file mode 100644
index 79ef404db4a29746f87148a98c7a9afcf6c24b1c..0000000000000000000000000000000000000000
--- a/papers/S55-Nanocarbon black-based ultra-high-performance concrete (UHPC) with self-strain sensing capability.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c20e88fce420d813c54eb79e07e3ad2acfbb561f1ca91e3e337a84d4d272957f
-size 13785148
diff --git a/papers/S56-Self-sensing cementitious composites incorporated with botryoid hybrid nano-carbon materials for smart infrastructures.pdf b/papers/S56-Self-sensing cementitious composites incorporated with botryoid hybrid nano-carbon materials for smart infrastructures.pdf
deleted file mode 100644
index dec6737aef8175f86a392399a5ae6516a8b3a653..0000000000000000000000000000000000000000
--- a/papers/S56-Self-sensing cementitious composites incorporated with botryoid hybrid nano-carbon materials for smart infrastructures.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a532fcca8956b3b3b48d5c428d3bde8622282cba5046e0900ed07ed5a5bba4c1
-size 15055251
diff --git a/papers/S57-IN~1.PDF b/papers/S57-IN~1.PDF
deleted file mode 100644
index af059e590e6207bdf951d26a9cd0e1ecff1ffd23..0000000000000000000000000000000000000000
--- a/papers/S57-IN~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5a2892da932effa517373198c1bf6b1b1de513af9b9fdb014162ea18e1c0b462
-size 3163837
diff --git a/papers/S58-DE~1.PDF b/papers/S58-DE~1.PDF
deleted file mode 100644
index bcb71cddf255204e21a0534609d416ad49883309..0000000000000000000000000000000000000000
--- a/papers/S58-DE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:48ab637580ebe8e7eb90748f15dbf2ed77db4360f11a2812cb2740dd5ba2d6b1
-size 13215053
diff --git a/papers/S59-Modifying self-sensing cement-based composites through multiscale composition.pdf b/papers/S59-Modifying self-sensing cement-based composites through multiscale composition.pdf
deleted file mode 100644
index d625234fc0f001d1d9893a2fc242c472b48304fb..0000000000000000000000000000000000000000
--- a/papers/S59-Modifying self-sensing cement-based composites through multiscale composition.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a5424bea150e0dd686db5d29a25d22c5473c9c23be6c4fd0701d49f7a01dd42d
-size 2415522
diff --git a/papers/S6-Electrically conductive behaviors and mechanisms of short-cut super-fine stainless wire reinforced reactive powder concrete.pdf b/papers/S6-Electrically conductive behaviors and mechanisms of short-cut super-fine stainless wire reinforced reactive powder concrete.pdf
deleted file mode 100644
index e2785bd0f70af8886df67466164a864458fc7d26..0000000000000000000000000000000000000000
--- a/papers/S6-Electrically conductive behaviors and mechanisms of short-cut super-fine stainless wire reinforced reactive powder concrete.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5177c1bdea76f9fb4c9f4bd2e74a0babe65c3292abebe1b950b2858ff4a74d65
-size 3796831
diff --git a/papers/S60-Study on self-sensing capabilities of smart cements filled with graphene oxide under dynamic cyclic loading.pdf b/papers/S60-Study on self-sensing capabilities of smart cements filled with graphene oxide under dynamic cyclic loading.pdf
deleted file mode 100644
index 2ac1e51c6230ed43fa31e0c14cfa9ff44bf1b9da..0000000000000000000000000000000000000000
--- a/papers/S60-Study on self-sensing capabilities of smart cements filled with graphene oxide under dynamic cyclic loading.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f19f63f52bab091820f22604a648c9f5dc1eaaca2579ef26c9bf177d79f21de5
-size 24421288
diff --git a/papers/S61-Piezoresistivity, mechanisms and model of cement-based materials with CNT_NCB composite fillers.pdf b/papers/S61-Piezoresistivity, mechanisms and model of cement-based materials with CNT_NCB composite fillers.pdf
deleted file mode 100644
index b9380046528c98597c43defa418935ef0e431023..0000000000000000000000000000000000000000
--- a/papers/S61-Piezoresistivity, mechanisms and model of cement-based materials with CNT_NCB composite fillers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:062d8c36aae503446f215e311751d85d0df139f9c83fbc09dca464e8eb19de3d
-size 6193779
diff --git a/papers/S62-MU~1.PDF b/papers/S62-MU~1.PDF
deleted file mode 100644
index 2d4a5038685d40a3d10d8d962ed03c188aab44ef..0000000000000000000000000000000000000000
--- a/papers/S62-MU~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4819c4791c85548a1010506860258f5b08e8dc6324ca8fb8f0561032aac84a50
-size 3324328
diff --git a/papers/S63-Piezoresistive properties of cement composites with expanded graphite.pdf b/papers/S63-Piezoresistive properties of cement composites with expanded graphite.pdf
deleted file mode 100644
index b62c5e1284370942ba7899951231e29ec5873dc8..0000000000000000000000000000000000000000
--- a/papers/S63-Piezoresistive properties of cement composites with expanded graphite.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6c48637727d0ef0077b68731bc05a04eb176356d7c27b097a0f888b00d1315c5
-size 1227018
diff --git a/papers/S64-Electrical Properties of Cement-Based Composites with Carbon Nanotubes, Graphene, and Graphite Nanofibers.pdf b/papers/S64-Electrical Properties of Cement-Based Composites with Carbon Nanotubes, Graphene, and Graphite Nanofibers.pdf
deleted file mode 100644
index 8c3f0cfe1bdbf82aed7ed2a94769c14ec96e5fed..0000000000000000000000000000000000000000
--- a/papers/S64-Electrical Properties of Cement-Based Composites with Carbon Nanotubes, Graphene, and Graphite Nanofibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6864c96bd0aaf0ec759e5c194604cf2004f4a32d2a78a12ca6049eff9baf80b1
-size 7122538
diff --git a/papers/S65-AN~1.PDF b/papers/S65-AN~1.PDF
deleted file mode 100644
index 5b2915236fd4d3f3a7941246a0e27fc6dab3a4fc..0000000000000000000000000000000000000000
--- a/papers/S65-AN~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:55ee65d8b993f0f53684b7153ceadab2835f6231738c9efa872d18b2854abcf9
-size 15597375
diff --git a/papers/S66-Experimental Investigation of the Piezoresistive Properties of Cement Composites with Hybrid Carbon Fibers and Nanotubes.pdf b/papers/S66-Experimental Investigation of the Piezoresistive Properties of Cement Composites with Hybrid Carbon Fibers and Nanotubes.pdf
deleted file mode 100644
index 18fab23d93ca65ab8e2511033b043416f6aa96c8..0000000000000000000000000000000000000000
--- a/papers/S66-Experimental Investigation of the Piezoresistive Properties of Cement Composites with Hybrid Carbon Fibers and Nanotubes.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c4d1df74398b98a19593ca7e894a030ce4cbfe80ee8932562825f8a0ff0bc894
-size 7165856
diff --git a/papers/S67-Strain and damage sensing properties on multifunctional cement composites with CNF admixture.pdf b/papers/S67-Strain and damage sensing properties on multifunctional cement composites with CNF admixture.pdf
deleted file mode 100644
index 5b4f5f7d24e31970c10ac8c2cd2bb0fe28718e0f..0000000000000000000000000000000000000000
--- a/papers/S67-Strain and damage sensing properties on multifunctional cement composites with CNF admixture.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:84cb49d73df980fbe34bcc1458b65b29b026898c78148a79515147021a109fe8
-size 3012871
diff --git a/papers/S68-EF~1.PDF b/papers/S68-EF~1.PDF
deleted file mode 100644
index 9235c86ac3f133a5cc866bb359b80843a550f1d6..0000000000000000000000000000000000000000
--- a/papers/S68-EF~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:012dbfb4626d8b1a5e0f889b43d2fe857ddebf89ad7cd9483441d6eecce89bcf
-size 11767156
diff --git a/papers/S69-Cement-based sensors with carbon fibers and carbon nanotubes for piezoresistive sensing.pdf b/papers/S69-Cement-based sensors with carbon fibers and carbon nanotubes for piezoresistive sensing.pdf
deleted file mode 100644
index 44ec2c56d68d9b1dfb17d1f4b19e658c57278da3..0000000000000000000000000000000000000000
--- a/papers/S69-Cement-based sensors with carbon fibers and carbon nanotubes for piezoresistive sensing.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1072fcff77cfb359219ba3dcb83a80bccdb229cf8654d3b5ddff43c75680dce1
-size 4997706
diff --git a/papers/S7-Electrical characteristics and pressure-sensitive response measurements of carboxyl MWNT_cement composites.pdf b/papers/S7-Electrical characteristics and pressure-sensitive response measurements of carboxyl MWNT_cement composites.pdf
deleted file mode 100644
index beb544cc7e2592b68b35dd7f7d0172c456fc54a2..0000000000000000000000000000000000000000
--- a/papers/S7-Electrical characteristics and pressure-sensitive response measurements of carboxyl MWNT_cement composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:eab438f2eb01a24d2f84c401e3455e95ae1b83d30da33612a31939a021a4b159
-size 1220413
diff --git a/papers/S70-EV~1.PDF b/papers/S70-EV~1.PDF
deleted file mode 100644
index 58cac1cc3844bc4ca604986dca644f2b23efd625..0000000000000000000000000000000000000000
--- a/papers/S70-EV~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1716e40e91e6197e22d13d2e9b57a5285d1da5e816c191c1a375be4db3a7e1d8
-size 3222731
diff --git a/papers/S71-Enhanced sensing performance of cement-based composites achieved via magnetically aligned nickel particle network.pdf b/papers/S71-Enhanced sensing performance of cement-based composites achieved via magnetically aligned nickel particle network.pdf
deleted file mode 100644
index 9f28837812ceb70cf19beadf1ff5e71ab59348e3..0000000000000000000000000000000000000000
--- a/papers/S71-Enhanced sensing performance of cement-based composites achieved via magnetically aligned nickel particle network.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0364e93c0a7d5f26210161b95c7ec8e813e467e527c3179c5e2e51271f044699
-size 2466101
diff --git a/papers/S72-Anisotropic electrical and piezoresistive sensing properties of cement-based sensors with aligned carbon fibers.pdf b/papers/S72-Anisotropic electrical and piezoresistive sensing properties of cement-based sensors with aligned carbon fibers.pdf
deleted file mode 100644
index 94af8c6d2c9193844de499e9bd766a4bf09da679..0000000000000000000000000000000000000000
--- a/papers/S72-Anisotropic electrical and piezoresistive sensing properties of cement-based sensors with aligned carbon fibers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1e201c54c7944cecda81d099c79417e67a5e3d0f35e8a6c947e944873fea6328
-size 13762763
diff --git a/papers/S73-Development of self-sensing cement-based sensor using recycled fine waste glass aggregates coated with carbon nanotube.pdf b/papers/S73-Development of self-sensing cement-based sensor using recycled fine waste glass aggregates coated with carbon nanotube.pdf
deleted file mode 100644
index ac31f86f6f61551c2cd755fc5551b80833a34f7e..0000000000000000000000000000000000000000
--- a/papers/S73-Development of self-sensing cement-based sensor using recycled fine waste glass aggregates coated with carbon nanotube.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8edac093f803a1522b926998e12a4241a8853c71bf6e6a88bac4da8d2f23ed28
-size 12303203
diff --git a/papers/S74-Strain sensitivity of steel-fiber-reinforced industrial smart concrete.pdf b/papers/S74-Strain sensitivity of steel-fiber-reinforced industrial smart concrete.pdf
deleted file mode 100644
index 59191f0c728290346fd7fceb83df4eb483d26de9..0000000000000000000000000000000000000000
--- a/papers/S74-Strain sensitivity of steel-fiber-reinforced industrial smart concrete.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9fedb594de888f2740b7ed806e9267f693a9500ab4d29367fad296b2d832f1de
-size 1293565
diff --git a/papers/S75-SE~1.PDF b/papers/S75-SE~1.PDF
deleted file mode 100644
index 6fae742a24a19174532e1951073254c2fb001f08..0000000000000000000000000000000000000000
--- a/papers/S75-SE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a0db1086d06fc09c70b213208035cdcdc7d4bb1e13f0681800a4c9c4f686508c
-size 2262482
diff --git a/papers/S76-Strain-sensing characteristics of self-consolidating concrete with micro-carbon fibre.pdf b/papers/S76-Strain-sensing characteristics of self-consolidating concrete with micro-carbon fibre.pdf
deleted file mode 100644
index 96755959d501792364cf2b6fcb511acd8ef07268..0000000000000000000000000000000000000000
--- a/papers/S76-Strain-sensing characteristics of self-consolidating concrete with micro-carbon fibre.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:18278bbcf1dbe4469c1b464b2229c7b6e5cd1bc8bbe323713a1f71fdb6710376
-size 2994157
diff --git a/papers/S77-SE~1.PDF b/papers/S77-SE~1.PDF
deleted file mode 100644
index 5afc743fcf1f9b73bc7b57204a8a64f841f76a06..0000000000000000000000000000000000000000
--- a/papers/S77-SE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:96c8c144d4f5fca59b636cd070ee8bad7e44a70bf0d38fadd84a995bb9e59157
-size 16005477
diff --git a/papers/S78-Mechanical and self-sensing properties of concrete reinforced with carbon nanofibres.pdf b/papers/S78-Mechanical and self-sensing properties of concrete reinforced with carbon nanofibres.pdf
deleted file mode 100644
index 3b493f51f9d261b21d83303d9b98a39d3bd61cf2..0000000000000000000000000000000000000000
--- a/papers/S78-Mechanical and self-sensing properties of concrete reinforced with carbon nanofibres.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d62c775830604b2edb3843fa9bb647fcf252a62b2abeb117f1818030baec5546
-size 3071465
diff --git a/papers/S79-Carbon nanotube cement-based transducers for dynamic sensing of strain.pdf b/papers/S79-Carbon nanotube cement-based transducers for dynamic sensing of strain.pdf
deleted file mode 100644
index 004a642dae73985a77ac3b61d71f16703e5299c9..0000000000000000000000000000000000000000
--- a/papers/S79-Carbon nanotube cement-based transducers for dynamic sensing of strain.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:681dbe149a8346929caaf5692dee8cac5595785257e9ebefec824b44521821d7
-size 2051612
diff --git a/papers/S8-Electrically-cured-ultra-high-performance-concrete--UHPC--embe_2020_Material.pdf b/papers/S8-Electrically-cured-ultra-high-performance-concrete--UHPC--embe_2020_Material.pdf
deleted file mode 100644
index 493d49956920cb1200a670f7a6d50f9ffe5bd6fe..0000000000000000000000000000000000000000
--- a/papers/S8-Electrically-cured-ultra-high-performance-concrete--UHPC--embe_2020_Material.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:eeb093891a2d37ed498e22625854d17d82f6d55c211de29bf7c8b54e6267a0e1
-size 3607932
diff --git a/papers/S80-MA~1.PDF b/papers/S80-MA~1.PDF
deleted file mode 100644
index 790251a3578a1974e11c7ed8afecf1353c50095c..0000000000000000000000000000000000000000
--- a/papers/S80-MA~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f469b2fcb96caefbb1b9027fc86e341190fde92e070b15ba13cedf3a34fa2c6b
-size 16319982
diff --git a/papers/S81-Piezoresistive properties of ultra-high-performance fiber-reinforced concrete incorporating few-layer graphene.pdf b/papers/S81-Piezoresistive properties of ultra-high-performance fiber-reinforced concrete incorporating few-layer graphene.pdf
deleted file mode 100644
index fe99a625425f153099fca43aec42e5a73d24e0bf..0000000000000000000000000000000000000000
--- a/papers/S81-Piezoresistive properties of ultra-high-performance fiber-reinforced concrete incorporating few-layer graphene.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:91e4d8db7aaacc608eceba5603fd180032bf6fcde322f3c7fbe0a0e1329803af
-size 10262770
diff --git a/papers/S82-SY~1.PDF b/papers/S82-SY~1.PDF
deleted file mode 100644
index 0cdfb686406fd8b07cedf38850b2319d5ca37e1e..0000000000000000000000000000000000000000
--- a/papers/S82-SY~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6c8940b634126260b348e96b73449f5dfea6e9dfab85db80e1b925648fec1870
-size 3992079
diff --git a/papers/S83-Effect of compressive strain on electrical resistivity of carbon black-filled cement-based composites.pdf b/papers/S83-Effect of compressive strain on electrical resistivity of carbon black-filled cement-based composites.pdf
deleted file mode 100644
index 4b2318173b06cb284e81388aff1bdb8b7ff433b6..0000000000000000000000000000000000000000
--- a/papers/S83-Effect of compressive strain on electrical resistivity of carbon black-filled cement-based composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:18b50bf2225e8fb32805f3e2f9cddff287880193fc1b60d1702d55781337c32d
-size 163920
diff --git a/papers/S84-TA~1.PDF b/papers/S84-TA~1.PDF
deleted file mode 100644
index 6648fc465ae9a5df6b6801da7d1c7f76abb60663..0000000000000000000000000000000000000000
--- a/papers/S84-TA~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:be525dafbb967e828d61c764570774066353084c893de1975ba7087748510bb6
-size 5528292
diff --git a/papers/S85-Performance of cement-based sensors with CNT for strain sensing.pdf b/papers/S85-Performance of cement-based sensors with CNT for strain sensing.pdf
deleted file mode 100644
index bde9bc6a4ca2fc00e9eb400313fc8646837bcefe..0000000000000000000000000000000000000000
--- a/papers/S85-Performance of cement-based sensors with CNT for strain sensing.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2bff2949b8ff47979195522031dac9e11415444b3db0f3114f706d8d655b7b88
-size 730254
diff --git a/papers/S86-EL~1.PDF b/papers/S86-EL~1.PDF
deleted file mode 100644
index e3e83fe94163cbc5f13c321e560b2d291b70ecaa..0000000000000000000000000000000000000000
--- a/papers/S86-EL~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a8502c7e954eaaa6a590036c4b42abbb6d0085a7febe8d7cb47b13539a8d505e
-size 4244725
diff --git a/papers/S87-EL~1.PDF b/papers/S87-EL~1.PDF
deleted file mode 100644
index 9c2a3d4ef3f8329b39d57821a1aebacc0250f8d1..0000000000000000000000000000000000000000
--- a/papers/S87-EL~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:07a84d78fea417033fef5d3029b1e789cdf9ad464d24132dfb06614f7e67e0c4
-size 3716769
diff --git a/papers/S88-ST~1.PDF b/papers/S88-ST~1.PDF
deleted file mode 100644
index b2e9dbf0149d41d5534771c13eaa8b2e16f51761..0000000000000000000000000000000000000000
--- a/papers/S88-ST~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9d0eb72525458a6dcbfb0f49ef2ae8b45fc89d53ceffd1b12abb50197022aedb
-size 13136208
diff --git a/papers/S89-Piezoresistivity of carbon fiber graphite cement-based composites with CCCW.pdf b/papers/S89-Piezoresistivity of carbon fiber graphite cement-based composites with CCCW.pdf
deleted file mode 100644
index 7f3f5be454ed64844875e9607f2e4992f4e340da..0000000000000000000000000000000000000000
--- a/papers/S89-Piezoresistivity of carbon fiber graphite cement-based composites with CCCW.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4b4996efb9f79a2f39a3153f858c98cde83afee8a1fcbf23fb53abcd429f4202
-size 404258
diff --git a/papers/S9-Electro-mechanical-self-sensing-response-of-ultra-high-_2018_Composites-Part.pdf b/papers/S9-Electro-mechanical-self-sensing-response-of-ultra-high-_2018_Composites-Part.pdf
deleted file mode 100644
index e226b2c3177657eb09395b20c9f44753525a4ab3..0000000000000000000000000000000000000000
--- a/papers/S9-Electro-mechanical-self-sensing-response-of-ultra-high-_2018_Composites-Part.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a7e94da1f3cc6f36547b623d8e29001a771e4f14f763e3a18ff800e1137ef35c
-size 2754170
diff --git a/papers/S90-EX~1.PDF b/papers/S90-EX~1.PDF
deleted file mode 100644
index 4496c0992e566fb3f33868ec5fd2a19183017b6b..0000000000000000000000000000000000000000
--- a/papers/S90-EX~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a80fafbfeb56a8cbd64558af1bd6cef1fc7b12e909cac7d07b849dfc6761ec61
-size 1578157
diff --git a/papers/S91-A comparative study on the influences of CNT and GNP on the piezoresistivity of cement composites.pdf b/papers/S91-A comparative study on the influences of CNT and GNP on the piezoresistivity of cement composites.pdf
deleted file mode 100644
index 5f117423f16720169f1fcd9b4878ef42a0fd966f..0000000000000000000000000000000000000000
--- a/papers/S91-A comparative study on the influences of CNT and GNP on the piezoresistivity of cement composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:26754f30ff36b29d6e865120aa0cecd563b0541c119f48daaef35cbf54593df6
-size 2053359
diff --git a/papers/S92-Research-on-the-self-sensing-and-mechanical-properties-of_2021_Cement-and-Co.pdf b/papers/S92-Research-on-the-self-sensing-and-mechanical-properties-of_2021_Cement-and-Co.pdf
deleted file mode 100644
index f14612bbdbe9c0606840ce3d02626d7555a2981b..0000000000000000000000000000000000000000
--- a/papers/S92-Research-on-the-self-sensing-and-mechanical-properties-of_2021_Cement-and-Co.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c660448974160d75d8424370693c4ed9007fcd56d18c012b59b30c50d2432f27
-size 27016738
diff --git a/papers/S93-Enhanced effects of carbon-based conductive materials on the piezoresistive characteristics of cementitious composites.pdf b/papers/S93-Enhanced effects of carbon-based conductive materials on the piezoresistive characteristics of cementitious composites.pdf
deleted file mode 100644
index ab30b8c7e5e574201d5d8cc7920c32a98b2d52ae..0000000000000000000000000000000000000000
--- a/papers/S93-Enhanced effects of carbon-based conductive materials on the piezoresistive characteristics of cementitious composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3d7c9e0aa6286de6439265aecb1fc9f196c6ddb742f8dea0deb7e3078848b3e4
-size 14592696
diff --git "a/papers/S94-The Utilization of Pearson\342\200\231s Method to Analyze Piezoresistive Effect in Self-Sensing Cement Composite with Graphite.pdf" "b/papers/S94-The Utilization of Pearson\342\200\231s Method to Analyze Piezoresistive Effect in Self-Sensing Cement Composite with Graphite.pdf"
deleted file mode 100644
index 2dd9935ba99ff24e42e168173b601e6f60e42cf4..0000000000000000000000000000000000000000
--- "a/papers/S94-The Utilization of Pearson\342\200\231s Method to Analyze Piezoresistive Effect in Self-Sensing Cement Composite with Graphite.pdf"
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:61d312bad8b8acb4c90bccbaea142b314b4caa013a286c7fbbd3af0ccd4156f3
-size 4529973
diff --git a/papers/S95-SE~1.PDF b/papers/S95-SE~1.PDF
deleted file mode 100644
index c8aa16bd9bd7b9fdf6be474976f2637930b3162c..0000000000000000000000000000000000000000
--- a/papers/S95-SE~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5e3ec53cd4cd4229f24d963dfced89b3fd656e1eeea938e2b9a3185ee07c3932
-size 16963413
diff --git a/papers/S96-EL~1.PDF b/papers/S96-EL~1.PDF
deleted file mode 100644
index 2439ab6727616705de4ae4a2a7133b5a3abb1d94..0000000000000000000000000000000000000000
--- a/papers/S96-EL~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:022c6d1d3d4015297de7ee68c97e143ead9bf39f2a64e7651b269af88ad9c622
-size 3281717
diff --git a/papers/S97-Self-sensing GFRP-reinforced concrete beams containing carbon nanotube-nano carbon black composite fillers.pdf b/papers/S97-Self-sensing GFRP-reinforced concrete beams containing carbon nanotube-nano carbon black composite fillers.pdf
deleted file mode 100644
index ff2da5416265838b9136dc8a83cd8ee6aedbd846..0000000000000000000000000000000000000000
--- a/papers/S97-Self-sensing GFRP-reinforced concrete beams containing carbon nanotube-nano carbon black composite fillers.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a4c53f707e02b5bbb1bb5bd7737ccc2e14b07a9f9b87587318de03ca1e51d009
-size 4253755
diff --git a/papers/S98-MI~1.PDF b/papers/S98-MI~1.PDF
deleted file mode 100644
index 11ba1eb7071f9c148fee13c532919726aa8e0757..0000000000000000000000000000000000000000
--- a/papers/S98-MI~1.PDF
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9dd3ebcfbb3ff5461eaa8704c9a6d5512ba75201b2a90c85a61aa2d591101de3
-size 4448195
diff --git a/papers/S99-Commercial and recycled carbon-based fillers and fibers for self-sensing cement-based composites.pdf b/papers/S99-Commercial and recycled carbon-based fillers and fibers for self-sensing cement-based composites.pdf
deleted file mode 100644
index 7179ab57f9d37ae2c2029c12b6a1ca9e5212b45f..0000000000000000000000000000000000000000
--- a/papers/S99-Commercial and recycled carbon-based fillers and fibers for self-sensing cement-based composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d670025463c90ea5a24f6efffb58a6b3a113c9f54ab5f370e74ef62cddc9ef0f
-size 10497058
diff --git a/papers/Self-sensing enhancement in smart ultra-high performance concrete composites via multi-scale carbon black.pdf b/papers/Self-sensing enhancement in smart ultra-high performance concrete composites via multi-scale carbon black.pdf
deleted file mode 100644
index c0947fa7714d9fdf5c448dfe011dd87e6b0cb693..0000000000000000000000000000000000000000
--- a/papers/Self-sensing enhancement in smart ultra-high performance concrete composites via multi-scale carbon black.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:799b4c4f68ed00e08bbe3d813ac8cb8c9c1af928f670d3b98f7babe85265cbf7
-size 27286084
diff --git a/papers/Self-sensing performance of cementitious composites with functional fillers at macro, micro and nano scales.pdf b/papers/Self-sensing performance of cementitious composites with functional fillers at macro, micro and nano scales.pdf
deleted file mode 100644
index de77da53f00e4f7a05f2390c2d14493198161d19..0000000000000000000000000000000000000000
--- a/papers/Self-sensing performance of cementitious composites with functional fillers at macro, micro and nano scales.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5294471d90d1e5f00ccb8c75ca4609fcbb6a904a38572ea04065338adac7d311
-size 16829972
diff --git "a/papers/Self\342\200\220Sensing Cementitious Composites with Hierarchical Carbon Fiber\342\200\220Carbon Nanotube Composite Fillers.pdf" "b/papers/Self\342\200\220Sensing Cementitious Composites with Hierarchical Carbon Fiber\342\200\220Carbon Nanotube Composite Fillers.pdf"
deleted file mode 100644
index ad42bb3b9d72f29ffe42935a5f26885977d15e66..0000000000000000000000000000000000000000
--- "a/papers/Self\342\200\220Sensing Cementitious Composites with Hierarchical Carbon Fiber\342\200\220Carbon Nanotube Composite Fillers.pdf"
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3cb7da3dc23d4b0574ee6f35418c645375387ce752a0471e67da6c2116ab9b3d
-size 4618102
diff --git a/papers/Silane treatment of bagasse fiber for reinforcement of cementitious composites.pdf b/papers/Silane treatment of bagasse fiber for reinforcement of cementitious composites.pdf
deleted file mode 100644
index 7a06b85d6e014355820351555953cb88403b98c3..0000000000000000000000000000000000000000
--- a/papers/Silane treatment of bagasse fiber for reinforcement of cementitious composites.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:53a11b159186e73755b13f95b56e874baa40f14eb884dcb5c0c01e8e0927b517
-size 1331002
diff --git a/papers/The effect of silane surface treatment on the mechanical properties of UHPFRC.pdf b/papers/The effect of silane surface treatment on the mechanical properties of UHPFRC.pdf
deleted file mode 100644
index d4807c6e24fcb0e2523886c0270c85069567d38e..0000000000000000000000000000000000000000
--- a/papers/The effect of silane surface treatment on the mechanical properties of UHPFRC.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:21a6533a565fd6fe0e8c4b07f9b47a152f5db5f6d0812df66bb1a1e45b0d7872
-size 9710444
diff --git a/papers/document.pdf b/papers/document.pdf
deleted file mode 100644
index 1f28a49d435b3ddbaea81a87d8c92cca96b2e316..0000000000000000000000000000000000000000
--- a/papers/document.pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5e61abd7af687789049c084604eabe2085e6e22bacfae95ee9aa2165e9362893
-size 1081440
diff --git a/rag_artifacts/.gitkeep b/rag_artifacts/.gitkeep
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/rag_eval_metrics.py b/rag_eval_metrics.py
deleted file mode 100644
index 49115eb68de130220ca3f2dff4cafee89c1eb3b9..0000000000000000000000000000000000000000
--- a/rag_eval_metrics.py
+++ /dev/null
@@ -1,727 +0,0 @@
-#!/usr/bin/env python3
-"""
-rag_eval_metrics.py
-
-Evaluate RAG retrieval quality by comparing app logs (JSONL) with a gold file (CSV).
-
-Extended to also evaluate answer quality using:
-- Lexical similarity: BLEU, ROUGE-1/2/L
-- Semantic similarity: BERTScore (Recall, F1)
-
-If nltk / rouge-score / bert-score are missing, the script still runs and
-returns NaN for these metrics instead of crashing.
-
-Also uses robust CSV reading to handle non-UTF8 encodings (cp1252/latin1).
-"""
-
-import argparse
-import json
-import os
-import sys
-from pathlib import Path
-from typing import Dict, List, Tuple, Any, Optional
-
-import pandas as pd
-import numpy as np
-
-# ----------------------------- Small Utils ----------------------------- #
-
-def filename_key(s: str) -> str:
- s = (s or "").strip().replace("\\", "/").split("/")[-1]
- return s.casefold()
-
-def re_split_sc(s: str) -> List[str]:
- import re
- return re.split(r"[;,]", s)
-
-def _pick_last_non_empty(hit_lists) -> List[dict]:
- """
- Robustly select the last non-empty hits list from a pandas Series or iterable.
-
- This fixes the KeyError that happens when using reversed() directly on a Series
- with a non-range index.
- """
- # Convert pandas Series or other iterables to a plain Python list
- try:
- values = list(hit_lists.tolist())
- except AttributeError:
- values = list(hit_lists)
-
- # Walk from last to first, return first non-empty list-like
- for lst in reversed(values):
- if isinstance(lst, (list, tuple)) and len(lst) > 0:
- return lst
-
- # If everything was empty / NaN
- return []
-
-def _read_csv_robust(path: Path) -> pd.DataFrame:
- """
- Try multiple encodings so we don't crash on Windows-1252 / Latin-1 CSVs.
- """
- encodings = ["utf-8", "utf-8-sig", "cp1252", "latin1"]
- last_err = None
- for enc in encodings:
- try:
- return pd.read_csv(path, encoding=enc)
- except UnicodeDecodeError as e:
- last_err = e
- continue
- # If all fail, re-raise the last error
- raise last_err if last_err is not None else ValueError(
- "Failed to read CSV with fallback encodings."
- )
-
-# ----------------------------- IO Helpers ----------------------------- #
-
-def read_logs(jsonl_path: Path) -> pd.DataFrame:
- """
- Read RAG JSONL logs and aggregate by question.
-
- Returns a DataFrame with columns:
- - question: original question text (last occurrence)
- - hits: list of dicts {doc, page} for retrieval
- - answer: final answer text logged for that question
- """
- rows = []
- if (not jsonl_path.exists()) or jsonl_path.stat().st_size == 0:
- return pd.DataFrame(columns=["question", "hits", "answer"])
-
- with open(jsonl_path, "r", encoding="utf-8") as f:
- for line in f:
- line = line.strip()
- if not line:
- continue
- try:
- rec = json.loads(line)
- except Exception:
- continue
-
- # Extract question
- q = (((rec.get("inputs") or {}).get("question")) or "").strip()
-
- # Extract retrieval hits (if present)
- retr = (rec.get("retrieval") or {})
- hits = retr.get("hits", [])
- norm_hits = []
- for h in hits or []:
- doc = (h.get("doc") or "").strip()
- page = str(h.get("page") or "").strip()
-
- # Normalize page to int or None
- try:
- page_int = int(page)
- except Exception:
- page_int = None
-
- norm_hits.append({"doc": doc, "page": page_int})
-
- # Extract final answer text (if present)
- out = (rec.get("output") or {})
- ans = ((out.get("final_answer") or "")).strip()
-
- rows.append({"question": q, "hits": norm_hits, "answer": ans})
-
- df = pd.DataFrame(rows)
- if df.empty:
- return pd.DataFrame(columns=["question", "hits", "answer"])
-
- # Group by normalized question text and keep last non-empty hits list and answer per question
- df = (
- df.groupby(df["question"].astype(str).str.casefold().str.strip(), as_index=False)
- .agg({
- "question": "last",
- "hits": _pick_last_non_empty,
- "answer": "last"
- })
- )
- return df
-
-def read_gold(csv_path: Path) -> Tuple[pd.DataFrame, Dict[str, str]]:
- """
- Read gold CSV with retrieval labels and optional reference answers.
-
- Returns:
- - gold_df: rows with columns ['question', 'doc', 'page', 'answer', ...]
- where 'question' is normalized (casefold+strip)
- - gold_answers: dict mapping normalized question -> reference answer text
- """
- df = _read_csv_robust(csv_path)
- cols = {c.lower().strip(): c for c in df.columns}
-
- # --- question column ---
- q_col = None
- for cand in ["question", "query", "q"]:
- if cand in cols:
- q_col = cols[cand]
- break
- if q_col is None:
- raise ValueError("Gold CSV must contain a 'question' column (case-insensitive).")
-
- # --- possible relevant_docs (list-in-cell) column ---
- rel_list_col = None
- for cand in ["relevant_docs", "relevant", "docs"]:
- if cand in cols:
- rel_list_col = cols[cand]
- break
-
- # --- single-doc-per-row column ---
- doc_col = None
- for cand in ["doc", "document", "file", "doc_name"]:
- if cand in cols:
- doc_col = cols[cand]
- break
-
- # --- optional page column ---
- page_col = None
- for cand in ["page", "page_num", "page_number"]:
- if cand in cols:
- page_col = cols[cand]
- break
-
- # --- optional answer column (for QA metrics) ---
- ans_col = None
- for cand in ["answer", "reference_answer", "gold_answer"]:
- if cand in cols:
- ans_col = cols[cand]
- break
-
- rows = []
-
- # Case 1: relevant_docs list column (no explicit doc_col)
- if rel_list_col and doc_col is None:
- for _, r in df.iterrows():
- q_raw = str(r[q_col]).strip()
- q_norm = q_raw.casefold().strip()
- ans_raw = str(r[ans_col]).strip() if (ans_col and pd.notna(r[ans_col])) else ""
-
- rel_val = str(r[rel_list_col]) if pd.notna(r[rel_list_col]) else ""
- if not rel_val:
- rows.append({
- "question_raw": q_raw,
- "question": q_norm,
- "doc": None,
- "page": np.nan,
- "answer": ans_raw
- })
- continue
-
- parts = [p.strip() for p in re_split_sc(rel_val)]
- for d in parts:
- rows.append({
- "question_raw": q_raw,
- "question": q_norm,
- "doc": filename_key(d),
- "page": np.nan,
- "answer": ans_raw
- })
-
- # Case 2: doc/page columns (one relevant doc per row)
- elif doc_col:
- for _, r in df.iterrows():
- q_raw = str(r[q_col]).strip()
- q_norm = q_raw.casefold().strip()
- ans_raw = str(r[ans_col]).strip() if (ans_col and pd.notna(r[ans_col])) else ""
-
- d = str(r[doc_col]).strip() if pd.notna(r[doc_col]) else ""
- p = r[page_col] if (page_col and pd.notna(r[page_col])) else np.nan
-
- try:
- p = int(p)
- except Exception:
- p = np.nan
-
- rows.append({
- "question_raw": q_raw,
- "question": q_norm,
- "doc": filename_key(d),
- "page": p,
- "answer": ans_raw
- })
-
- else:
- raise ValueError("Gold CSV must contain either a 'doc' column or a 'relevant_docs' column.")
-
- gold = pd.DataFrame(rows)
-
- # Keep only rows with a valid doc (when docs exist)
- gold["has_doc"] = gold["doc"].apply(lambda x: isinstance(x, str) and len(x) > 0)
- if gold["has_doc"].any():
- gold = gold[gold["has_doc"]].copy()
- gold.drop(columns=["has_doc"], inplace=True, errors="ignore")
-
- # Remove duplicates
- gold = gold.drop_duplicates(subset=["question", "doc", "page"])
-
- # Build question -> gold_answer map (normalized questions)
- gold_answers: Dict[str, str] = {}
- if "answer" in gold.columns:
- tmp = (
- gold[["question", "answer"]]
- .dropna(subset=["answer"])
- .drop_duplicates(subset=["question"])
- )
- gold_answers = dict(zip(tmp["question"], tmp["answer"]))
-
- return gold, gold_answers
-
-# ----------------------------- Retrieval Metric Core ----------------------------- #
-
-def dcg_at_k(relevances: List[int]) -> float:
- dcg = 0.0
- for i, rel in enumerate(relevances, start=1):
- if rel > 0:
- dcg += 1.0 / np.log2(i + 1.0)
- return float(dcg)
-
-def ndcg_at_k(relevances: List[int]) -> float:
- dcg = dcg_at_k(relevances)
- ideal = sorted(relevances, reverse=True)
- idcg = dcg_at_k(ideal)
- if idcg == 0.0:
- return 0.0
- return float(dcg / idcg)
-
-def compute_metrics_for_question(gold_docs, gold_pages, hits, k):
- top = hits[:k] if hits else []
- pred_docs = [filename_key(h.get("doc", "")) for h in top]
- pred_pairs = [(filename_key(h.get("doc", "")), h.get("page", None)) for h in top]
-
- # --- Doc-level metrics ---
- gold_doc_set = set([d for d in gold_docs if isinstance(d, str) and d])
-
- rel_bin_doc = [1 if d in gold_doc_set else 0 for d in pred_docs]
- hitk_doc = 1 if any(rel_bin_doc) else 0
- prec_doc = (sum(rel_bin_doc) / max(1, len(pred_docs))) if pred_docs else 0.0
- rec_doc = (sum(rel_bin_doc) / max(1, len(gold_doc_set))) if gold_doc_set else 0.0
- ndcg_doc = ndcg_at_k(rel_bin_doc)
-
- # --- Page-level metrics (only if gold has page labels) ---
- gold_pairs = set()
- for d, p in zip(gold_docs, gold_pages):
- if isinstance(d, str) and d and (p is not None) and (not (isinstance(p, float) and np.isnan(p))):
- try:
- p_int = int(p)
- except Exception:
- continue
- gold_pairs.add((d, p_int))
-
- if gold_pairs:
- rel_bin_page = []
- for (d, p) in pred_pairs:
- if p is None or not isinstance(p, int):
- rel_bin_page.append(0)
- else:
- rel_bin_page.append(1 if (d, p) in gold_pairs else 0)
-
- hitk_page = 1 if any(rel_bin_page) else 0
- prec_page = (sum(rel_bin_page) / max(1, len(pred_pairs))) if pred_pairs else 0.0
- rec_page = (sum(rel_bin_page) / max(1, len(gold_pairs))) if gold_pairs else 0.0
- ndcg_page = ndcg_at_k(rel_bin_page)
- else:
- hitk_page = prec_page = rec_page = ndcg_page = np.nan
-
- return {
- "hit@k_doc": hitk_doc,
- "precision@k_doc": prec_doc,
- "recall@k_doc": rec_doc,
- "ndcg@k_doc": ndcg_doc,
- "hit@k_page": hitk_page,
- "precision@k_page": prec_page,
- "recall@k_page": rec_page,
- "ndcg@k_page": ndcg_page,
- "n_gold_docs": int(len(gold_doc_set)),
- "n_gold_doc_pages": int(len(gold_pairs)),
- "n_pred": int(len(pred_docs))
- }
-
-# ---------------------- Answer Quality Metrics (with fallbacks) ---------------------- #
-
-# Try to import optional libraries; if missing, we fall back to NaN metrics
-try:
- from nltk.translate.bleu_score import sentence_bleu, SmoothingFunction
- HAVE_NLTK = True
-except Exception:
- sentence_bleu = None
- SmoothingFunction = None
- HAVE_NLTK = False
-
-try:
- from rouge_score import rouge_scorer
- HAVE_ROUGE = True
-except Exception:
- rouge_scorer = None
- HAVE_ROUGE = False
-
-try:
- from bert_score import score as bert_score
- HAVE_BERT = True
-except Exception:
- bert_score = None
- HAVE_BERT = False
-
-if HAVE_NLTK:
- _SMOOTH = SmoothingFunction().method1
-else:
- _SMOOTH = None
-
-if HAVE_ROUGE:
- _ROUGE_SCORER = rouge_scorer.RougeScorer(
- ["rouge1", "rouge2", "rougeL"], use_stemmer=True
- )
-else:
- _ROUGE_SCORER = None
-
-def _normalize_text_for_metrics(s: str) -> str:
- import re
- s = (s or "").strip().lower()
- # remove simple markdown markers
- s = re.sub(r"\*\*|\*", "", s)
- # drop inline citations like (Doc.pdf, p.X)
- s = re.sub(r"\([^)]*\)", " ", s)
- s = re.sub(r"\s+", " ", s)
- return s.strip()
-
-def compute_text_metrics(pred: str, ref: str) -> Dict[str, float]:
- """
- Compute lexical and semantic similarity metrics between prediction and reference:
- - BLEU
- - ROUGE-1/2/L (F-measure)
- - BERTScore Recall, F1
-
- If the required libraries (nltk, rouge-score, bert-score) are not installed,
- returns NaN for all metrics.
- """
- # If any of the libraries is missing, skip answer metrics
- if not (HAVE_NLTK and HAVE_ROUGE and HAVE_BERT):
- return {
- "bleu": np.nan,
- "rouge1": np.nan,
- "rouge2": np.nan,
- "rougeL": np.nan,
- "bert_recall": np.nan,
- "bert_f1": np.nan,
- }
-
- pred_n = _normalize_text_for_metrics(pred)
- ref_n = _normalize_text_for_metrics(ref)
-
- if not pred_n or not ref_n:
- return {
- "bleu": np.nan,
- "rouge1": np.nan,
- "rouge2": np.nan,
- "rougeL": np.nan,
- "bert_recall": np.nan,
- "bert_f1": np.nan,
- }
-
- pred_tokens = pred_n.split()
- ref_tokens = ref_n.split()
-
- # BLEU (sentence-level with smoothing)
- bleu = float(
- sentence_bleu([ref_tokens], pred_tokens, smoothing_function=_SMOOTH)
- )
-
- # ROUGE via rouge-score (F-measure)
- rs = _ROUGE_SCORER.score(ref_n, pred_n)
- rouge1 = float(rs["rouge1"].fmeasure)
- rouge2 = float(rs["rouge2"].fmeasure)
- rougeL = float(rs["rougeL"].fmeasure)
-
- # BERTScore (semantic similarity)
- P, R, F1 = bert_score([pred_n], [ref_n], lang="en", rescale_with_baseline=True)
- bert_recall = float(R.mean().item())
- bert_f1 = float(F1.mean().item())
-
- return {
- "bleu": bleu,
- "rouge1": rouge1,
- "rouge2": rouge2,
- "rougeL": rougeL,
- "bert_recall": bert_recall,
- "bert_f1": bert_f1,
- }
-
-# ----------------------------- Orchestration ----------------------------- #
-
-# === Dark blue and accent colors ===
-COLOR_TITLE = "\033[94m" # light blue for titles
-COLOR_TEXT = "\033[34m" # dark blue
-COLOR_ACCENT = "\033[36m" # cyan for metrics
-COLOR_RESET = "\033[0m"
-
-def _fmt(x: Any) -> str:
- try:
- return f"{float(x):.3f}"
- except Exception:
- return "-"
-
-def main():
- ap = argparse.ArgumentParser()
- ap.add_argument("--gold_csv", required=True, type=str)
- ap.add_argument("--logs_jsonl", required=True, type=str)
- ap.add_argument("--k", type=int, default=8)
- ap.add_argument("--out_dir", type=str, default="rag_artifacts")
- args = ap.parse_args()
-
- out_dir = Path(args.out_dir)
- out_dir.mkdir(parents=True, exist_ok=True)
-
- gold_path = Path(args.gold_csv)
- logs_path = Path(args.logs_jsonl)
-
- if not gold_path.exists():
- print(
- f"{COLOR_TEXT}❌ gold.csv not found at {gold_path}{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
- if not logs_path.exists() or logs_path.stat().st_size == 0:
- print(
- f"{COLOR_TEXT}❌ logs JSONL not found or empty at {logs_path}{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
-
- # Read gold (retrieval + QA answers)
- try:
- gold, gold_answers = read_gold(gold_path)
- except Exception as e:
- print(
- f"{COLOR_TEXT}❌ Failed to read gold: {e}{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
-
- # Read logs (with robust aggregation)
- try:
- logs = read_logs(logs_path)
- except Exception as e:
- print(
- f"{COLOR_TEXT}❌ Failed to read logs: {e}{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
-
- if gold.empty:
- print(
- f"{COLOR_TEXT}❌ Gold file contains no usable rows.{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
- if logs.empty:
- print(
- f"{COLOR_TEXT}❌ Logs file contains no usable entries.{COLOR_RESET}",
- file=sys.stderr,
- )
- sys.exit(0)
-
- # Build gold dict: normalized_question -> list of (doc, page)
- gdict: Dict[str, List[Tuple[str, Optional[int]]]] = {}
- for _, r in gold.iterrows():
- q = str(r["question"]).strip() # already normalized in read_gold
- d = r["doc"]
- p = r["page"] if "page" in r else np.nan
- gdict.setdefault(q, []).append((d, p))
-
- # Normalize log questions for join
- logs["q_norm"] = logs["question"].astype(str).str.casefold().str.strip()
-
- perq_rows = []
- not_in_logs, not_in_gold = [], []
-
- # For each gold question, compute metrics using logs
- for q_norm, pairs in gdict.items():
- row = logs[logs["q_norm"] == q_norm]
- gdocs = [d for (d, _) in pairs]
- gpages = [p for (_, p) in pairs]
-
- if row.empty:
- # No logs for this gold question → zero retrieval and no answer metrics
- not_in_logs.append(q_norm)
- base_metrics = {
- "hit@k_doc": 0,
- "precision@k_doc": 0.0,
- "recall@k_doc": 0.0,
- "ndcg@k_doc": 0.0,
- "hit@k_page": np.nan,
- "precision@k_page": np.nan,
- "recall@k_page": np.nan,
- "ndcg@k_page": np.nan,
- "n_gold_docs": int(len(set([d for d in gdocs if isinstance(d, str) and d]))),
- "n_gold_doc_pages": int(
- len(
- [
- (d, p)
- for (d, p) in zip(gdocs, gpages)
- if isinstance(d, str) and d and pd.notna(p)
- ]
- )
- ),
- "n_pred": 0,
- }
-
- txt_metrics = {
- "bleu": np.nan,
- "rouge1": np.nan,
- "rouge2": np.nan,
- "rougeL": np.nan,
- "bert_recall": np.nan,
- "bert_f1": np.nan,
- }
-
- perq_rows.append(
- {
- "question": q_norm,
- "covered_in_logs": 0,
- **base_metrics,
- **txt_metrics,
- }
- )
- continue
-
- # Use aggregated hits from read_logs
- hits = row.iloc[0]["hits"] or []
- base_metrics = compute_metrics_for_question(gdocs, gpages, hits, args.k)
-
- # Answer text: predicted vs. gold
- pred_answer = str(row.iloc[0].get("answer", "")).strip()
- gold_answer = str(gold_answers.get(q_norm, "")).strip()
-
- if gold_answer and pred_answer:
- txt_metrics = compute_text_metrics(pred_answer, gold_answer)
- else:
- txt_metrics = {
- "bleu": np.nan,
- "rouge1": np.nan,
- "rouge2": np.nan,
- "rougeL": np.nan,
- "bert_recall": np.nan,
- "bert_f1": np.nan,
- }
-
- perq_rows.append(
- {
- "question": q_norm,
- "covered_in_logs": 1,
- **base_metrics,
- **txt_metrics,
- }
- )
-
- # Any log questions not in gold
- gold_qs = set(gdict.keys())
- for qn in logs["q_norm"].tolist():
- if qn not in gold_qs:
- not_in_gold.append(qn)
-
- perq = pd.DataFrame(perq_rows)
- covered = perq[perq["covered_in_logs"] == 1].copy()
-
- agg = {
- "questions_total_gold": int(len(gdict)),
- "questions_covered_in_logs": int(covered.shape[0]),
- "questions_missing_in_logs": int(len(not_in_logs)),
- "questions_in_logs_not_in_gold": int(len(set(not_in_gold))),
- "k": int(args.k),
- "mean_hit@k_doc": float(covered["hit@k_doc"].mean()) if not covered.empty else 0.0,
- "mean_precision@k_doc": float(covered["precision@k_doc"].mean()) if not covered.empty else 0.0,
- "mean_recall@k_doc": float(covered["recall@k_doc"].mean()) if not covered.empty else 0.0,
- "mean_ndcg@k_doc": float(covered["ndcg@k_doc"].mean()) if not covered.empty else 0.0,
- "mean_hit@k_page": float(covered["hit@k_page"].dropna().mean())
- if covered["hit@k_page"].notna().any()
- else None,
- "mean_precision@k_page": float(covered["precision@k_page"].dropna().mean())
- if covered["precision@k_page"].notna().any()
- else None,
- "mean_recall@k_page": float(covered["recall@k_page"].dropna().mean())
- if covered["recall@k_page"].notna().any()
- else None,
- "mean_ndcg@k_page": float(covered["ndcg@k_page"].dropna().mean())
- if covered["ndcg@k_page"].notna().any()
- else None,
- "avg_gold_docs_per_q": float(perq["n_gold_docs"].mean()) if not perq.empty else 0.0,
- "avg_preds_per_q": float(perq["n_pred"].mean()) if not perq.empty else 0.0,
- "examples_missing_in_logs": list(not_in_logs[:10]),
- "examples_in_logs_not_in_gold": list(dict.fromkeys(not_in_gold))[:10],
- }
-
- # Aggregate answer-quality metrics (lexical + semantic)
- if "bleu" in covered.columns:
- agg["mean_bleu"] = float(covered["bleu"].mean(skipna=True))
- agg["mean_rouge1"] = float(covered["rouge1"].mean(skipna=True))
- agg["mean_rouge2"] = float(covered["rouge2"].mean(skipna=True))
- agg["mean_rougeL"] = float(covered["rougeL"].mean(skipna=True))
- agg["mean_bert_recall"] = float(covered["bert_recall"].mean(skipna=True))
- agg["mean_bert_f1"] = float(covered["bert_f1"].mean(skipna=True))
-
- perq_path = out_dir / "metrics_per_question.csv"
- agg_path = out_dir / "metrics_aggregate.json"
-
- perq.to_csv(perq_path, index=False)
- with open(agg_path, "w", encoding="utf-8") as f:
- json.dump(agg, f, ensure_ascii=False, indent=2)
-
- # === Console summary with color ===
- print(f"{COLOR_TITLE}RAG Evaluation Summary{COLOR_RESET}")
- print(f"{COLOR_TITLE}----------------------{COLOR_RESET}")
- print(f"{COLOR_TEXT}Gold questions: {COLOR_ACCENT}{agg['questions_total_gold']}{COLOR_RESET}")
- print(f"{COLOR_TEXT}Covered in logs: {COLOR_ACCENT}{agg['questions_covered_in_logs']}{COLOR_RESET}")
- print(f"{COLOR_TEXT}Missing in logs: {COLOR_ACCENT}{agg['questions_missing_in_logs']}{COLOR_RESET}")
- print(
- f"{COLOR_TEXT}In logs but not in gold: "
- f"{COLOR_ACCENT}{agg['questions_in_logs_not_in_gold']}{COLOR_RESET}"
- )
- print(f"{COLOR_TEXT}k = {COLOR_ACCENT}{agg['k']}{COLOR_RESET}\n")
-
- print(
- f"{COLOR_TEXT}Doc-level:{COLOR_RESET} "
- f"{COLOR_ACCENT}Hit@k={_fmt(agg['mean_hit@k_doc'])} "
- f"Precision@k={_fmt(agg['mean_precision@k_doc'])} "
- f"Recall@k={_fmt(agg['mean_recall@k_doc'])} "
- f"nDCG@k={_fmt(agg['mean_ndcg@k_doc'])}{COLOR_RESET}"
- )
-
- if agg.get("mean_hit@k_page") is not None:
- print(
- f"{COLOR_TEXT}Page-level:{COLOR_RESET} "
- f"{COLOR_ACCENT}Hit@k={_fmt(agg['mean_hit@k_page'])} "
- f"Precision@k={_fmt(agg['mean_precision@k_page'])} "
- f"Recall={_fmt(agg['mean_recall@k_page'])} "
- f"nDCG@k={_fmt(agg['mean_ndcg@k_page'])}{COLOR_RESET}"
- )
- else:
- print(f"{COLOR_TEXT}Page-level: (no page labels in gold){COLOR_RESET}")
-
- # Lexical metrics summary
- if "mean_bleu" in agg:
- print(
- f"{COLOR_TEXT}Lexical (answer quality):{COLOR_RESET} "
- f"{COLOR_ACCENT}BLEU={_fmt(agg.get('mean_bleu'))} "
- f"ROUGE-1={_fmt(agg.get('mean_rouge1'))} "
- f"ROUGE-2={_fmt(agg.get('mean_rouge2'))} "
- f"ROUGE-L={_fmt(agg.get('mean_rougeL'))}{COLOR_RESET}"
- )
-
- # Semantic metrics summary
- if "mean_bert_f1" in agg:
- print(
- f"{COLOR_TEXT}Semantic (BERTScore):{COLOR_RESET} "
- f"{COLOR_ACCENT}Recall={_fmt(agg.get('mean_bert_recall'))} "
- f"F1={_fmt(agg.get('mean_bert_f1'))}{COLOR_RESET}"
- )
-
- print()
- print(
- f"{COLOR_TEXT}Wrote per-question CSV → "
- f"{COLOR_ACCENT}{perq_path}{COLOR_RESET}"
- )
- print(
- f"{COLOR_TEXT}Wrote aggregate JSON → "
- f"{COLOR_ACCENT}{agg_path}{COLOR_RESET}"
- )
-
-if __name__ == "__main__":
- main()
diff --git a/requirements.txt b/requirements.txt
index 3fd8cc2b1c2388dd6c2d8415bfc67592b4ef07fe..ceda4050e2f066d149fbc87a3044d7b2ee593921 100644
Binary files a/requirements.txt and b/requirements.txt differ
diff --git a/stress_gf_xgb.joblib b/stress_gf_xgb.joblib
deleted file mode 100644
index dc0a827459f02880c5a944204229737de0190226..0000000000000000000000000000000000000000
--- a/stress_gf_xgb.joblib
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d1647acfa1a50c037437003f02b89ffeda2c82e4e7c852b87bce4c56449b521b
-size 1325590