From d6b13c8821c9d1ed2c81b730cfd2ae619b9ab3db Mon Sep 17 00:00:00 2001 From: chicham Date: Wed, 3 Jun 2026 15:33:17 +0200 Subject: [PATCH 1/2] feat(retrieval): add ColBERT late-interaction engine (PyLate + GTE-ModernColBERT) --- retrieval/retrieval.py | 101 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 12 deletions(-) diff --git a/retrieval/retrieval.py b/retrieval/retrieval.py index 7a10508..ed1d2bb 100644 --- a/retrieval/retrieval.py +++ b/retrieval/retrieval.py @@ -3,6 +3,7 @@ # dependencies = [ # "bm25s", # "splade-index", +# "pylate", # "sentence-transformers", # "simple-parsing", # "absl-py", @@ -10,7 +11,7 @@ # "orjson", # ] # /// -"""Page-level retrieval over DeepSeek-OCR'd annual reports (BM25 + SPLADE). +"""Page-level retrieval over DeepSeek-OCR'd annual reports (BM25 + SPLADE + ColBERT). Index an OCR'd annual-report tree **page by page**, then rank pages for a query — the goal is to measure whether a method surfaces the page that holds a given @@ -23,17 +24,22 @@ uv run retrieval/retrieval.py query --method bm25 --query "total revenue net sales" uv run retrieval/retrieval.py query --method bm25 --report NYSE_SLB_2018 --query "..." uv run retrieval/retrieval.py query --method splade --queries_file queries.tsv --top_k 10 + uv run retrieval/retrieval.py index --method colbert --root /path/to/mmd_tree -Pure-Python engines, no JVM: BM25 via ``bm25s`` (Lucene-equivalent scoring) and -SPLADE via ``splade-index`` + a ``sentence_transformers.SparseEncoder``. Both -share one docid space, so their ``run.trec`` files score against the same qrels. +No-JVM engines: BM25 via ``bm25s`` (Lucene-equivalent scoring), SPLADE via +``splade-index`` + a ``sentence_transformers.SparseEncoder``, and ColBERT +(late interaction) via ``pylate`` (a PLAID index + a ``models.ColBERT`` encoder; +no finance-specialised ColBERT exists on the Hub, so the default is the +long-context ``lightonai/GTE-ModernColBERT-v1``). All three share one docid +space, so their ``run.trec`` files score against the same qrels. Structure: frozen dataclasses parse the data they represent via ``from_*`` classmethods; fields carry validated types (named beartype predicates, so a violation reads e.g. ``Is[is_positive]``), which removes hand-written field checks. ``--method`` is a simple_parsing *subgroup*: ``bm25`` exposes -``--k1/--b``, ``splade`` exposes ``--model/--device`` — and the chosen engine -*is* the retrieval engine. The ``index``/``query`` subcommands are the +``--k1/--b``, ``splade`` exposes ``--model/--device``, ``colbert`` exposes +``--model/--device/--doc_length/--query_length/--nbits/--kmeans_niters/ +--batch_size/--show_progress`` — and the chosen engine *is* the retrieval engine. The ``index``/``query`` subcommands are the ``IndexConfig``/``QueryConfig`` dataclasses, run via ``.run()``; ``main`` is ``prog.command.run()``, wired into abseil via ``app.run(flags_parser=...)``. @@ -68,6 +74,11 @@ # A SparseEncoder-compatible SPLADE checkpoint (encodes docs + queries to sparse # term weights); the same model is used at index and query time. DEFAULT_SPLADE_MODEL = "naver/splade-cocondenser-ensembledistil" +# A PyLate-native ColBERT checkpoint. No finance/KPI-specialised ColBERT exists on +# the Hub (the nearest domain fine-tune is legal); GTE-ModernColBERT is ModernBERT- +# based with an 8k context, so it can index whole long financial pages without the +# 512-token truncation a classic BERT ColBERT (e.g. colbertv2.0) would impose. +DEFAULT_COLBERT_MODEL = "lightonai/GTE-ModernColBERT-v1" # {EXCHANGE}_{TICKER}_{YEAR}: ticker may contain '_'/'-'/'.'; YEAR = trailing 4. REPORT_RE = re.compile(r"^([A-Za-z0-9]+)_(.+)_(\d{4})$") @@ -115,7 +126,7 @@ def is_existing_dir(p: Path) -> bool: FiscalYear = Annotated[int, Is[is_fiscal_year]] DocId = Annotated[str, Is[is_docid]] ExistingDir = Annotated[Path, Is[is_existing_dir]] -Method = Literal["bm25", "splade"] +Method = Literal["bm25", "splade", "colbert"] Device = Literal["auto", "cpu", "cuda"] @@ -447,8 +458,74 @@ def search(self, index_dir: Path, texts: list[str], k: Positive) -> Ranked: for q in range(len(texts))] -Engine = Union[Bm25Engine, SpladeEngine] -ENGINES = {"bm25": Bm25Engine, "splade": SpladeEngine} +@beartype +@dataclass(frozen=True) +class ColbertEngine: + """PyLate late-interaction (ColBERT): a PLAID index + one ``models.ColBERT`` + encoder shared by docs and queries. Unlike BM25/SPLADE (one vector per page), + ColBERT keeps one vector *per token* and scores by MaxSim, so the index is + larger and ``--doc_length`` directly trades recall (capture the whole page) + against index size/latency. The default model is ModernBERT-based (8k ctx), + so a high ``--doc_length`` indexes full pages instead of silently truncating + them — the reason to prefer it over a 512-token classic ColBERT. + + Like the other engines, ``index`` writes to ``index_dir`` and ``search`` + *reopens* that on-disk index (``override=False``) — it never re-indexes.""" + + name: ClassVar[Method] = "colbert" + model: NonBlank = DEFAULT_COLBERT_MODEL + device: Device = "auto" + # Token cap per page (docs) / per query. doc_length high enough to swallow a + # whole OCR'd 10-K page; tokens beyond it are dropped (silent truncation). + doc_length: Positive = 2048 + query_length: Positive = 32 + nbits: Positive = 2 # PLAID residual-quantisation bits (2 = ColBERTv2 default) + kmeans_niters: Positive = 4 # PLAID centroid-training iterations + batch_size: Positive = 32 # encode batch size (docs at index, queries at search) + show_progress: bool = True # encode progress bar + index_name: NonBlank = "plaid" # subdir under index_dir holding the PLAID files + + def _encoder(self): + from pylate import models + + return models.ColBERT( + model_name_or_path=self.model, + document_length=self.doc_length, + query_length=self.query_length, + device=resolve_device(self.device), + ) + + def _index(self, index_dir: Path, override: bool): + from pylate import indexes + + return indexes.PLAID(index_folder=str(index_dir), index_name=self.index_name, + override=override, nbits=self.nbits, + kmeans_niters=self.kmeans_niters) + + def index(self, texts: list[str], index_dir: Path) -> None: + index_dir.mkdir(parents=True, exist_ok=True) + embeddings = self._encoder().encode( + texts, batch_size=self.batch_size, is_query=False, + show_progress_bar=self.show_progress) + # Corpus position is the PLAID docid; the caller maps it back via ids.json. + self._index(index_dir, override=True).add_documents( + documents_ids=[str(i) for i in range(len(texts))], + documents_embeddings=embeddings) + + def search(self, index_dir: Path, texts: list[str], k: Positive) -> Ranked: + from pylate import retrieve + + embeddings = self._encoder().encode( + texts, batch_size=self.batch_size, is_query=True, + show_progress_bar=self.show_progress) + index = self._index(index_dir, override=False) + ranked = retrieve.ColBERT(index=index).retrieve(queries_embeddings=embeddings, k=k) + return [[(int(h["id"]), float(h["score"])) for h in ranked[q]] + for q in range(len(texts))] + + +Engine = Union[Bm25Engine, SpladeEngine, ColbertEngine] +ENGINES = {"bm25": Bm25Engine, "splade": SpladeEngine, "colbert": ColbertEngine} @beartype @@ -500,7 +577,7 @@ class IndexConfig: """Build a page-level index from a tree of .mmd files.""" root: ExistingDir # tree of DeepSeek .mmd files (validated to exist) - # --method {bm25,splade}: choosing one exposes only that engine's flags. + # --method {bm25,splade,colbert}: choosing one exposes only that engine's flags. method: Engine = subgroups(ENGINES, default_factory=Bm25Engine) output_dir: Path = Path("retrieval/output") # artifacts -> // page_split_marker: NonBlank = DEFAULT_PAGE_SPLIT # case-insensitive page separator @@ -525,7 +602,7 @@ def run(self) -> None: class QueryConfig: """Run queries against an index (one --query, repeatable, or a --queries_file).""" - # --method {bm25,splade}: for splade this also sets the query --model/--device. + # --method {bm25,splade,colbert}: splade/colbert also set the query --model/--device. method: Engine = subgroups(ENGINES, default_factory=Bm25Engine) output_dir: Path = Path("retrieval/output") # reads // query: list[str] = field(default_factory=list) # query string(s) @@ -559,7 +636,7 @@ def run(self) -> None: # --- CLI: simple_parsing subcommands, wired into abseil's app.run ----------- # @dataclass class Program: - """Page-level retrieval over DeepSeek-OCR .mmd reports (BM25 + SPLADE).""" + """Page-level retrieval over DeepSeek-OCR .mmd reports (BM25 + SPLADE + ColBERT).""" command: Union[IndexConfig, QueryConfig] = subparsers( {"index": IndexConfig, "query": QueryConfig}) From 62a8a2a4e522c5168f3b0c21eef5f5afe22e8951 Mon Sep 17 00:00:00 2001 From: chicham Date: Thu, 4 Jun 2026 18:25:46 +0200 Subject: [PATCH 2/2] feat: limit doc length when encoding --- retrieval/output/colbert/docstore.jsonl | 190 +++++++++++++++++++++++ retrieval/retrieval.py | 196 +++++++++++++++++------- 2 files changed, 332 insertions(+), 54 deletions(-) create mode 100644 retrieval/output/colbert/docstore.jsonl diff --git a/retrieval/output/colbert/docstore.jsonl b/retrieval/output/colbert/docstore.jsonl new file mode 100644 index 0000000..b9943e5 --- /dev/null +++ b/retrieval/output/colbert/docstore.jsonl @@ -0,0 +1,190 @@ +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":0,"docid":"NYSE_MLR_2021#p0","snippet":"## Miller \\( ^{®} \\) \nINDUSTRIES\n\n## 2021 Annual Report"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":1,"docid":"NYSE_MLR_2021#p1","snippet":"Powered by TCPDF (www.tcpdf.org)"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":2,"docid":"NYSE_MLR_2021#p2","snippet":"## TO OUR SHAREHOLDERS\nApril 14, 2022\n\nDuring 2021, we have continued to weather the challenges related to COVID-19, the global supply chain and inflation. That said, we believe we are now better positioned than ever to capitalize on the return of normal market conditions. Though we cannot forecast exactly when such conditions might return, we have taken significant steps that should allow us to q"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":3,"docid":"NYSE_MLR_2021#p3","snippet":"Powered by TCPDF (www.tcpdf.org)"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":4,"docid":"NYSE_MLR_2021#p4","snippet":"# UNITED STATES\nSECURITIES AND EXCHANGE COMMISSION\nWASHINGTON, D.C. 20549\n\nFORM 10-K\n\n(Mark One)\n\n☒ ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934\n\nFor the fiscal year ended December 31, 2021\n\nOR\n\n☐ TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934\n\nFor the transition period from ___ to ___\n\nCommission File No. 001-14124\n"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":5,"docid":"NYSE_MLR_2021#p5","snippet":"## TABLE OF CONTENTS\n\n## PART I\n\nITEM 1. BUSINESS 3\nITEM 1A. RISK FACTORS 11\nITEM 1B. UNRESOLVED STAFF COMMENTS 18\nITEM 2. PROPERTIES 18\nITEM 3. LEGAL PROCEEDINGS 18\nITEM 4. MINE SAFETY DISCLOSURES 19\n\n## PART II\n\nITEM 5. MARKET FOR REGISTRANT'S COMMON EQUITY, RELATED STOCKHOLDER MATTERS AND ISSUER PURCHASES OF EQUITY SECURITIES 19\nITEM 6. [RESERVED] 20\nITEM 7. MANAGEMENT'S DISCUSSION AND ANALYSIS"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":6,"docid":"NYSE_MLR_2021#p6","snippet":"# CERTAIN FACTORS AFFECTING FORWARD-LOOKING STATEMENTS\n\nCertain statements in this Annual Report on Form 10-K, including but not limited to statements made in Part II, Item 7—\"Management’s Discussion and Analysis of Financial Condition and Results of Operations,\" statements made with respect to future operating results, expectations of future customer orders and the availability of resources neces"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":7,"docid":"NYSE_MLR_2021#p7","snippet":"• assertions against us relating to intellectual property rights;\n\n• a disruption in, or breach in security of, our information technology systems or any violation of data protection laws;\n\n• changes in the tax regimes and related government policies and regulations in the countries in which we operate;\n\n• the effects of regulations relating to conflict minerals;\n\n• the catastrophic loss of one of"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":8,"docid":"NYSE_MLR_2021#p8","snippet":"## ITEM 1. BUSINESS\n\n## General\n\nMiller Industries is The World’s Largest Manufacturer of Towing and Recovery Equipment \\( ^{®} \\) , with executive offices in Ooltewah, Tennessee, domestic manufacturing operations in Tennessee and Pennsylvania, and foreign manufacturing operations in France and the United Kingdom.\n\nIn 1990, we began developing or acquiring several of the most well-recognized brand"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":9,"docid":"NYSE_MLR_2021#p9","snippet":"Car Carriers. Car carriers are specialized flat-bed vehicles with hydraulic tilt mechanisms that enable a towing operator to drive or winch a vehicle onto the bed for transport. Car carriers are used to transport new or disabled vehicles and other equipment and are particularly effective for transporting vehicles or other equipment over longer distances. In addition to transporting vehicles, car c"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":10,"docid":"NYSE_MLR_2021#p10","snippet":"## Product Development and Manufacturing\n\n## Product Innovation and Manufacturing Process Improvements\n\nWe have a long history of innovation in our products and manufacturing processes based on advanced technologies. Our Holmes \\( ^{®} \\) and Century \\( ^{®} \\) brand names are associated with four of the major innovations in the industry: the rapid reverse winch; the tow sling; the hydraulic lif"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":11,"docid":"NYSE_MLR_2021#p11","snippet":"a material adverse effect on our business. We are continuing to closely monitor the COVID-19 pandemic and the further impacts it may have on the Company’s supply chain and operations.\n\n## Sales, Distribution and Marketing\n\nThe industry categorizes the towing and recovery market into three general product types: light-duty wreckers; heavy-duty wreckers; and car carriers. The light-duty wrecker mark"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":12,"docid":"NYSE_MLR_2021#p12","snippet":"historically high levels of orders. Our ability to reduce these high backlog levels will depend on future production schedules and the severity and duration of supply chain disruptions.\n\n## Competition\n\nThe towing and recovery equipment manufacturing industry is highly competitive for sales to distributors and towing operators. Management believes that competition in our industry focuses on produc"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":13,"docid":"NYSE_MLR_2021#p13","snippet":"We seek to provide a healthy and safe workplace. The modernization projects at all our domestic facilities in the last few years included many advanced health and safety features, such as the installation of air filtration equipment that removes airborne contaminants like smoke, dust, pollen and dander to improve the air quality at our production facilities. As part of these projects and upgrades,"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":14,"docid":"NYSE_MLR_2021#p14","snippet":"We are also subject to various federal, state and non-U.S. laws and regulations related to privacy, data protection and cybersecurity, including the European Union's General Data Protection Regulation (\"GDPR\"), which became effective in May 2018. In addition, California's Consumer Privacy Act came into effect on January 1, 2020, and enforcement began on July 1, 2020. Many other states are also att"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":15,"docid":"NYSE_MLR_2021#p15","snippet":"from 1996 to 2014 and as Vice Chairman of the Board from 2011 to 2014. Mr. Badgley also served as Vice President to Miller Industries Towing Equipment Inc. from 1988 to 1996 and has been their President since 1996.\n\nWilliam G. Miller, II has served as a director since May 2014, our Co-Chief Executive Officer since December 2013 and President since March 2011, after serving as a Regional Vice Presi"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":16,"docid":"NYSE_MLR_2021#p16","snippet":"## ITEM 1A. RISK FACTORS\n\nThere are many factors that affect our business and the results of our operations, some of which are beyond our control. The following is a description of all known material risks that may cause the actual results of our operations in future periods to differ materially from those currently expected or desired. We encourage you to read this section carefully.\n\n## Risks Re"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":17,"docid":"NYSE_MLR_2021#p17","snippet":"Our dependence upon outside suppliers for component parts, chassis and raw materials, including aluminum, steel, and petroleum-related products, leaves us subject to changes in price and availability (including as a result of increased demand due to improving economic conditions, the impact of the COVID-19 pandemic and supply chain difficulties) and delays in receiving supplies of such parts, chas"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":18,"docid":"NYSE_MLR_2021#p18","snippet":"In addition, employee turnover rates in the broader global economy have increased over the past year and may continue to remain elevated. Since the economy has begun to recover from the impact of the pandemic, we have experienced substantial increases in employee turnover and difficulties in hiring new workers for our skilled workforce, which has caused increased recruiting, training and retention"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":19,"docid":"NYSE_MLR_2021#p19","snippet":"economic uncertainties and impacts, including disruptions to trade and free movement of goods, services and people to and from Europe, disruptions to our workforce or the workforce of our suppliers or business partners. All of the foregoing risks could have a material adverse effect on our business, financial condition and results of operations.\n\nIn addition, a portion of our net sales derived out"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":20,"docid":"NYSE_MLR_2021#p20","snippet":"industry. Competition for sales exists domestically and internationally at the manufacturer, distributor and towing-operator levels and is based primarily on product quality and innovation, reputation, technology, customer service, product availability and price. Competition for sales also comes from the market for used towing and recovery equipment. Certain of our competitors may have substantial"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":21,"docid":"NYSE_MLR_2021#p21","snippet":"expensive and/or have an adverse effect on our operating results. Third party infringement claims, regardless of their outcome, would not only consume our financial resources, but also would divert the time and effort of our management and could result in our customers or potential customers deferring or limiting their purchase or use of the affected products or services until resolution of the li"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":22,"docid":"NYSE_MLR_2021#p22","snippet":"Our charter and bylaws contain anti-takeover provisions that may make it more difficult or expensive to acquire us in the future or may negatively affect our stock price.\n\nOur charter and bylaws contain restrictions that may discourage other persons from attempting to acquire control of us, including, without limitation, prohibitions on shareholder action by written consent and advance notice requ"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":23,"docid":"NYSE_MLR_2021#p23","snippet":"or unauthorized physical or electronic access. Such a breach could result in theft of our intellectual property or trade secrets and/or unauthorized access to controlled data and personal information stored in connection with our human resources function. In the event of a breach in security that allows third parties access to personal information, we are subject to a variety of ever-changing laws"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":24,"docid":"NYSE_MLR_2021#p24","snippet":"## ITEM 4. MINE SAFETY DISCLOSURES\n\nNot applicable.\n\n## PART II\n\n## ITEM 5. MARKET FOR REGISTRANT'S COMMON EQUITY, RELATED STOCKHOLDER MATTERS AND ISSUER PURCHASES OF EQUITY SECURITIES\n\n## Market Price of and Dividends on the Registrant’s Common Equity and Related Stockholder Matters\n\nOur common stock is traded on the New York Stock Exchange under the symbol “MLR.” As of February 28, 2022, there w"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":25,"docid":"NYSE_MLR_2021#p25","snippet":"## Performance Graph\n\nThe following line graph compares the percentage change in the cumulative shareholder return of our common stock with The New York Stock Exchange Composite Index and the Standard & Poor’s Construction Machinery & Heavy Trucks Index over the period of time from December 31, 2016 through December 31, 2021. The respective returns assume reinvestment of dividends paid.\n\n![](image"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":26,"docid":"NYSE_MLR_2021#p26","snippet":"of Financial Condition and Results of Operations,” the words “Miller Industries,” “the Company,” “we,” “our,” “ours” and “us” refer to Miller Industries, Inc. and its subsidiaries or any of them.\n\nOur management focuses on a variety of key indicators to monitor our overall operating and financial performance. These indicators include measurements of revenue, operating income, gross margin, net inc"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":27,"docid":"NYSE_MLR_2021#p27","snippet":"As of December 31, 2021 and 2020, the Company owed $0 under its primary credit facility.\n\nThe supply chain disruptions and workforce retention challenges we experienced during 2021 were due primarily to continued impacts from COVID-19. These factors along with our new software system implementation caused substantial downward pressures on our revenues, margins and earnings during 2021. The busines"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":28,"docid":"NYSE_MLR_2021#p28","snippet":"The impact of the COVID-19 pandemic and supply chain disruptions resulting from the economic recovery from the pandemic continue to unfold and their effect on our operational and financial performance will depend in large part on future developments, which cannot be predicted with confidence at this time. Future developments include the duration, scope and severity of the ongoing pandemic, includi"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":29,"docid":"NYSE_MLR_2021#p29","snippet":"an impairment loss would be recognized to the extent that the carrying value of the reporting unit exceeds its fair value, not to exceed the carrying value of the goodwill. We cannot predict the occurrence of certain events or changes in circumstances that might adversely affect the carrying value of goodwill. Such events might include, but are not limited to, the impact of the economic environmen"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":30,"docid":"NYSE_MLR_2021#p30","snippet":"While we manufacture only the bodies of wreckers and car carriers, which are installed on truck chassis manufactured by third parties, we frequently purchase truck chassis for resale to our customers. Sales of company-purchased truck chassis are included in net sales. Margin percentages are substantially lower on completed recovery vehicles containing company-purchased chassis.\n\n## Foreign Currenc"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":31,"docid":"NYSE_MLR_2021#p31","snippet":"2021, in comparison to the prior two quarters, which resulted in significantly increased expenses, and contributed to a substantial decrease in net income during the second half of 2021.\n\nInterest expense, net increased to \\(1,355 for the year ended December 31, 2021 from \\)1,215 for the year ended December 31, 2020. Increases in interest expense, net were primarily due to decreases in interest in"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":32,"docid":"NYSE_MLR_2021#p32","snippet":"impacted our ability to reduce our backlog, which has increased to historic highs. These supply chain disruptions and bottlenecks are continuing into 2022, but we are optimistic that they will ease in the second half of 2022, allowing cash to be allocated to future capital projects consistent with the Company’s past practices and the buildup in backlog to be reduced.\n\nAt December 31, 2021, we had "} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":33,"docid":"NYSE_MLR_2021#p33","snippet":"Changes in interest rates affect the interest paid on indebtedness under our credit facility because the outstanding amounts of indebtedness under our current credit facility are subject to variable interest rates. Under our credit facility, the non-default rate of interest is equal to the LIBOR Market Index Rate plus 1.00% or 1.25% per annum, depending on our leverage ratio, for a rate of interes"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":34,"docid":"NYSE_MLR_2021#p34","snippet":"## ITEM 7A. QUANTITATIVE AND QUALITATIVE DISCLOSURES ABOUT MARKET RISK\n\nIn the normal course of our business, we are exposed to market risk from changes in interest rates and foreign currency exchange rates that could impact our results of operations and financial position. Unless the context indicates otherwise, all dollar amounts in this “Item 7A. Quantitative and Qualitative Disclosures About M"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":35,"docid":"NYSE_MLR_2021#p35","snippet":"## ITEM 9A. CONTROLS AND PROCEDURES\n\n## Disclosure Controls and Procedures\n\nWe carried out an evaluation, under the supervision and with the participation of our management, including our Co-Chief Executive Officers and our Chief Financial Officer, of the effectiveness of the design and operation of our disclosure controls and procedures, as defined in Rules 13a-15(e) and 15d-15(e) under the Secur"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":36,"docid":"NYSE_MLR_2021#p36","snippet":"# Report of Independent Registered Public Accounting Firm\n\nTo the Shareholders and the Board of Directors of Miller Industries, Inc.:\n\n## Opinion on the Internal Control Over Financial Reporting\n\nWe have audited Miller Industries, Inc.'s and its subsidiaries (the \"Company\") internal control over financial reporting as of December 31, 2021, based on criteria established in Internal Control — Integr"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":37,"docid":"NYSE_MLR_2021#p37","snippet":"## ITEM 9B. OTHER INFORMATION\n\nNone.\n\n## ITEM 9C. DISCLOSURE REGARDING FOREIGN JURISDICTIONS THAT PREVENT INSPECTIONS\n\nNot applicable.\n\n## PART III\n\n## ITEM 10. DIRECTORS, EXECUTIVE OFFICERS AND CORPORATE GOVERNANCE\n\nThe Proxy Statement for our Annual Meeting of Shareholders, to be filed with the Securities and Exchange Commission pursuant to Regulation 14A not later than 120 days after the end of"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":38,"docid":"NYSE_MLR_2021#p38","snippet":"## 1. Financial Statements\n\n
DescriptionPage Number in Report
Report of Independent Registered Public Accounting FirmF-2
Consolidated Balance Sheets as of December 31, 2021 and 2020F-4
Consolidated Statements of Income for the years ended December 31, 2021, 2020 and 2019F-5
Consoli"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":39,"docid":"NYSE_MLR_2021#p39","snippet":"
DescriptionIncorporated by Reference to Registration File NumberForm or ReportDate of ReportExhibit Number in Report
10.2Form of Indemnification Agreement by and between the Registrant and each of Theodore H. Ashford, III, Jeffrey I. Badgley, A. Russell Chandler, III, Frank Madonia, William G. Miller, William G. "} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":40,"docid":"NYSE_MLR_2021#p40","snippet":"<"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":41,"docid":"NYSE_MLR_2021#p41","snippet":"[This page intentionally left blank.]"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":42,"docid":"NYSE_MLR_2021#p42","snippet":"## INDEX TO CONSOLIDATED FINANCIAL STATEMENTS\n\nREPORT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM F-2\nCONSOLIDATED BALANCE SHEETS DECEMBER 31, 2021 AND 2020 F-4\nCONSOLIDATED STATEMENTS OF INCOME FOR THE YEARS ENDED DECEMBER 31, 2021, 2020 AND 2019 F-5\nCONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME FOR THE YEARS ENDED DECEMBER 31, 2021, 2020 AND 2019 F-6\nCONSOLIDATED STATEMENTS OF SHAREHOLDER"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":43,"docid":"NYSE_MLR_2021#p43","snippet":"# Report of Independent Registered Public Accounting Firm\n\nTo the Shareholders and the Board of Directors of Miller Industries, Inc.:\n\n## Opinion on the Financial Statements\n\nWe have audited the accompanying consolidated balance sheets of Miller Industries, Inc. and its subsidiaries (the \"Company\") as of December 31, 2021 and 2020, the related consolidated statements of income, comprehensive incom"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":44,"docid":"NYSE_MLR_2021#p44","snippet":"deferred income tax liabilities of $5.2 million as of December 31, 2021. As of December 31, 2021, management has determined that it is more likely than not that all of the Company’s deferred tax assets are realizable against expected future taxable income.\n\nThe principal considerations for our determination that performing procedures relating to income taxes is a critical audit matter are the sign"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":45,"docid":"NYSE_MLR_2021#p45","snippet":"## MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n## CONSOLIDATED BALANCE SHEETS\nDECEMBER 31, 2021 AND 2020\n\n## (In thousands, except share data)\n\n
DescriptionIncorporated by Reference to Registration File NumberForm or ReportDate of ReportExhibit Number in Report
101.INSInline XBRL Instance Document - the instance document does not appear in the Interactive Data File because its XBRL tags are embedded within the Inline XBRL document.
20212020
ASSETS
CURRENT ASSETS:
Cash and temporary investments\\( 54,332\\) 57,521
Accounts receivable, n"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":46,"docid":"NYSE_MLR_2021#p46","snippet":"## MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n## CONSOLIDATED STATEMENTS OF INCOME\nFOR THE YEARS ENDED DECEMBER 31, 2021, 2020 AND 2019\n\n## (In thousands, except per share data)\n\n
202120202019
NET SALES\\( 717,476\\) 651,286\\( 818,166
COSTS OF OPERATIONS647,624572,928721,67"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":47,"docid":"NYSE_MLR_2021#p47","snippet":"## MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n## CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME\nFOR THE YEARS ENDED DECEMBER 31, 2021, 2020 AND 2019\n\n## (In thousands)\n\n
NET INCOME202120202019
\\( 16,255\\) 29,830\\( 39,111
OTHER COMPREHENSIVE INCOME (LOSS):
Common StockAdditional Paid-In CapitalAccumulated SurplusAccumulated Other Comprehensive LossTotal
BALANCE, December 31, 2018\\"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":49,"docid":"NYSE_MLR_2021#p49","snippet":"## MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n## CONSOLIDATED STATEMENTS OF CASH FLOWS\nFOR THE YEARS ENDED DECEMBER 31, 2021, 2020 AND 2019\n\n## (In thousands)\n\n
OPERATING ACTIVITIES:202120202019
Net income\\( 16,255\\) 29,830\\( 39,111
Adjustments to reconcile net income to net cash "} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":50,"docid":"NYSE_MLR_2021#p50","snippet":"# MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n# NOTES TO CONSOLIDATED FINANCIAL STATEMENTS\n\n# (in thousands, except share data and except as otherwise noted)\n\n## 1. ORGANIZATION AND NATURE OF OPERATIONS\n\nMiller Industries, Inc. and subsidiaries (the “Company”) is The World’s Largest Manufacturer of Towing and Recovery Equipment. \\( ^{®} \\) The principal markets for the Company’s towing and recovery"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":51,"docid":"NYSE_MLR_2021#p51","snippet":"determining net realizable value. Revisions of these estimates could result in the need for adjustments. Inventories, net of reserves, at December 31, 2021 and 2020 consisted of the following:\n\n
20212020
Chassis\\( 5,753\\) 6,859
Raw materials59,6513"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":52,"docid":"NYSE_MLR_2021#p52","snippet":"## Goodwill\n\nGoodwill consists of the excess of cost of acquired entities over the sum of the amounts assigned to identifiable assets acquired less liabilities assumed. Goodwill is not amortized. However, the Company evaluates the carrying value of goodwill for impairment at least annually or if an event or circumstance occurs that would indicate that the carrying amount had been impaired. Goodwil"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":53,"docid":"NYSE_MLR_2021#p53","snippet":"The table below provides a summary of the warranty liability for December 31, 2021 and 2020:\n\n
20212020
Accrual at beginning of the year\\( 3,373\\) 3,859
Provision2,4162,915
Settlement and Other(2,713)(3,401)
Accrual at end of year\\( 3,07"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":54,"docid":"NYSE_MLR_2021#p54","snippet":"## Recent Accounting Pronouncements\n\n## Recently Issued Standards\n\nIn October 2021, the FASB issued ASU 2021-08, Business Combinations (Topic 805). The update provides guidance on how to measure and recognize contract assets and contract liabilities when purchased as part of a business combination. According to the guidance, the acquirer must follow ASC Topic 606 in accounting for the contract ass"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":55,"docid":"NYSE_MLR_2021#p55","snippet":"## 4. STOCK-BASED COMPENSATION PLANS\n\nIn accordance with the Company’s stock-based compensation plans, the Company may grant incentive stock options as well as non-qualified and other stock-related incentives to officers, employees and non-employee directors of the Company. At the Annual Meeting of Shareholders of the Company held on May 26, 2017, the Company’s shareholders voted to approve the Mi"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":56,"docid":"NYSE_MLR_2021#p56","snippet":"A maturity analysis of the undiscounted cash flows of operating and finance lease obligations is as follows:\n\n<"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":57,"docid":"NYSE_MLR_2021#p57","snippet":"the Company could be required to purchase was approximately \\(47,883 and \\)56,822 at December 31, 2021 and 2020, respectively. The Company’s risk under these arrangements is mitigated by the value of the products that would be repurchased as part of the transaction. The Company considered the fair value at inception of its liability under these arrangements and concluded that the liability associa"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":58,"docid":"NYSE_MLR_2021#p58","snippet":"Deferred income tax assets and liabilities reflect the impact of temporary differences between the amounts of assets and liabilities for financial reporting and income tax reporting purposes. Temporary differences and carry forwards which give rise to deferred tax assets and liabilities at December 31, 2021 and 2020 are as follows:\n\n
Operating Lease ObligationFinance Lease Obligation
Remaining lease payments to be paid during the year ended December 31,
2022\\( 402\\) 15
2023325
20212020
Deferr"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":59,"docid":"NYSE_MLR_2021#p59","snippet":"## Dividends\n\nThe Company has paid consecutive quarterly cash dividends since May 2011. Dividend payments made for 2021, 2020 and 2019 were as follows:\n\n
PaymentRecord DatePayment DateDividend (per share)Amount
Q1 2019March 18, 2019March 25, 2019\\( 0.18\\) 2,052
Q2 2019Ju"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":60,"docid":"NYSE_MLR_2021#p60","snippet":"Contract assets primarily relate to the Company’s rights to consideration for work completed but not billed at the reporting date. The contract assets are transferred to receivables when the rights become unconditional. Contract liabilities primarily relate to performance obligations to be satisfied in the future. As of December 31, 2021 and December 31, 2020, contract liability balances were \\(25"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":61,"docid":"NYSE_MLR_2021#p61","snippet":"## MILLER INDUSTRIES, INC. AND SUBSIDIARIES\n\n## SCHEDULE II – VALUATION AND QUALIFYING ACCOUNTS\n\n(in thousands)\n\n"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":62,"docid":"NYSE_MLR_2021#p62","snippet":"## SIGNATURES\n\nPursuant to the requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934, the Registrant has duly caused this Report to be signed on its behalf by the undersigned, thereunto duly authorized, on the 9th day of March, 2022.\n\nMILLER INDUSTRIES, INC.\n\nBy: /s/ William G. Miller, II\n\nWilliam G. Miller, II\n\nPresident, Chief Executive Officer and Director\n\nKnow all men by "} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":63,"docid":"NYSE_MLR_2021#p63","snippet":"## SUBSIDIARIES\n\n
Balance at Beginning of PeriodCharged to ExpenseAccounts Written OffBalance at End of Period
Year Ended December 31, 2019
Deduction from asset accounts:
Name of EntityJurisdiction of Incorporation
APACO, Inc.Delaware
Boniface Engineering, Ltd.United Kingdom
Champion Carrier CorporationDelaware
Jige International S.A.France
Miller/Greeneville, Inc.Tennessee
Miller"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":64,"docid":"NYSE_MLR_2021#p64","snippet":"## CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM\n\nWe consent to the incorporation by reference in the following Registration Statements:\n\n(1) Registration Statement on Form S-8 (File No. 333-127481);\n\n(2) Registration Statement on Form S-8 (File No. 333-188898); and\n\n(3) Registration Statement on Form S-8 (File No. 333-219288).\n\nof Miller Industries, Inc. and subsidiaries of our reports"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":65,"docid":"NYSE_MLR_2021#p65","snippet":"I, William G. Miller, II, certify that:\n\n1. I have reviewed this annual report on Form 10-K of Miller Industries, Inc.;\n\n2. Based on my knowledge, this report does not contain any untrue statement of a material fact or omit to state a material fact necessary to make the statements made, in light of the circumstances under which such statements were made, not misleading with respect to the period c"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":66,"docid":"NYSE_MLR_2021#p66","snippet":"I, Deborah L. Whitmire, certify that:\n\n1. I have reviewed this annual report on Form 10-K of Miller Industries, Inc.;\n\n2. Based on my knowledge, this report does not contain any untrue statement of a material fact or omit to state a material fact necessary to make the statements made, in light of the circumstances under which such statements were made, not misleading with respect to the period cov"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":67,"docid":"NYSE_MLR_2021#p67","snippet":"## CERTIFICATION PURSUANT TO 18 U.S.C. SECTION 1350\n\nIn connection with the Annual Report of Miller Industries, Inc. (the “Company”) on Form 10-K for the period ended December 31, 2021 filed with the Securities and Exchange Commission on the date hereof (the “Report”), I, William G. Miller, II, Chief Executive Officer of the Company, certify, pursuant to 18 U.S.C. § 1350 as adopted by § 906 of the"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":68,"docid":"NYSE_MLR_2021#p68","snippet":"## CERTIFICATION PURSUANT TO 18 U.S.C. SECTION 1350\n\nIn connection with the Annual Report of Miller Industries, Inc. (the “Company”) on Form 10-K for the period ended December 31, 2021 filed with the Securities and Exchange Commission on the date hereof (the “Report”), I, Deborah L. Whitmire, Executive Vice President and Chief Financial Officer of the Company, certify, pursuant to 18 U.S.C. § 1350"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":69,"docid":"NYSE_MLR_2021#p69","snippet":"[This page intentionally left blank.]"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":70,"docid":"NYSE_MLR_2021#p70","snippet":"[This page intentionally left blank.]"} +{"report":"NYSE_MLR_2021","exchange":"NYSE","ticker":"MLR","year":2021,"page":71,"docid":"NYSE_MLR_2021#p71","snippet":"Powered by TCPDF (www.tcpdf.org)"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":0,"docid":"NYSE_SLB_2018#p0","snippet":"## 2018 Annual Report\nSchlumberger Limited\n\n![](images/0_0.jpg)"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":1,"docid":"NYSE_SLB_2018#p1","snippet":"Schlumberger is the world’s leading provider of technology for reservoir characterization, drilling, production, and processing to the oil and gas industry.\n\nWorking in more than 85 countries and employing approximately 100,000 people who represent over 140 nationalities, Schlumberger supplies the industry's most comprehensive range of products and services, from exploration through production, an"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":2,"docid":"NYSE_SLB_2018#p2","snippet":"![](images/2_0.jpg)\n\n## Front Cover\n\nA field engineer uses Concert \\( ^{*} \\) well testing live performance technology to carry out data analysis of real-time surface and downhole measurements during a well testing operation. Concert performance significantly increases operational control and collaboration, providing a step change in operational efficiency with a particular focus on safety and th"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":3,"docid":"NYSE_SLB_2018#p3","snippet":"## Letter to Shareholders\n\nThe gradual recovery of the oil price during the first three quarters of 2018 drove strong global activity, particularly in the development of unconventional land resources in the US. Once oil prices began to fall sharply in the fourth quarter, however, US land activity slowed while international activity remained firm as E&P investment continued to be robust. Against th"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":4,"docid":"NYSE_SLB_2018#p4","snippet":"International revenue grew faster than in North America during the third quarter of 2018 for the first time since 2014, marking the beginning of a positive activity trend after three consecutive years of declining revenue. This was driven by the increased activity of the national oil companies as they began to accelerate investment in longer-term resource development. One major result of this for "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":5,"docid":"NYSE_SLB_2018#p5","snippet":"![](images/5_0.jpg)\n\n![](images/5_1.jpg)\n\n![](images/5_2.jpg)\n\n![](images/5_3.jpg)\n\nlower greenhouse gas emissions in field operations. This is integral to achieving our goal to improve social and economic conditions in the communities where we live and work. Taken together, our people, technology, and processes make us the partner of choice in the sustainable, responsible development of hydrocarb"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":6,"docid":"NYSE_SLB_2018#p6","snippet":"## Performed by Schlumberger\n\n![](images/6_0.jpg)\n\nThis was the 19th year of the Performed by Schlumberger program, which recognizes projects and their team members who have demonstrated exceptional levels of teamwork, innovation, and business impact for Schlumberger. Only one project receives the Chairman’s Award, representing an outstanding example of our core values: our people, our commitment "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":7,"docid":"NYSE_SLB_2018#p7","snippet":"Well construction and operations specialists in the drilling control room prepare to run casing using the Schlumberger rig of the future's advanced mechanization features and integrated equipment sequencing software. This rig is part of the OneDrill integrated drilling system."} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":8,"docid":"NYSE_SLB_2018#p8","snippet":"## Technology Drives E&P Performance\n\nNew technology has enabled the E&P industry to address technical challenges within a variety of operating and business environments that are in a constant state of change. This has driven performance and pushed the technical envelope while delivering a superior return on investment to the E&P industry. Schlumberger has established an extensive portfolio of por"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":9,"docid":"NYSE_SLB_2018#p9","snippet":"## The Path to Digital Technology Integration\n\nThe current oil price environment has driven many oil and gas operators to focus on maximizing cash flow by producing their fields harder and prioritizing short-term actions versus longer-term reservoir management. Given this scenario, how can the industry achieve a step change in E&P performance over the full cycle for the benefit of all stakeholders"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":10,"docid":"NYSE_SLB_2018#p10","snippet":"## Technology Spotlight: GyroSphere Service\n\n![](images/10_0.jpg)\n\nOilfield drilling technology is subject to environmental conditions such as severe mechanical shocks and vibrations. A technician uses a field emission scanning electron microscope to analyze a microelectromechanical system (MEMS) sensor for gyro surveying while drilling in the oil field. Solid-state technology enables the GyroSphe"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":11,"docid":"NYSE_SLB_2018#p11","snippet":"## Integrated Drilling\n\nGiven that approximately two-thirds of the oil discovered is currently left in the ground, the application of customized technology is key to increasing cost-efficient field development. During the last few years, the industry has depended on enhancements of discrete drilling technologies to improve drilling performance. Optimizing drilling efficiency, however, demands expe"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":12,"docid":"NYSE_SLB_2018#p12","snippet":"![](images/12_0.jpg)\n\nThe HyperBlade hyperbolic diamond element bit reduces drilling costs by increasing the rate of penetration with improved steering response in soft and plastic rock formations. The new technology incorporates the Hyper hyperbolic diamond cutting elements that cut 20% deeper into rock compared with conventional polycrystalline diamond compact cutters.\n\nAs operating environments"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":13,"docid":"NYSE_SLB_2018#p13","snippet":"## Integrated Completions\n\nIn North America, the expansion of unconventional resource development has benefitted from adopting technologies and processes, such as multistage completions, to improve operational efficiency and reduce operating costs. Furthermore, the integration of best-in-class hydraulic fracturing, multistage completions, and pumpdown perforating technologies is leading to increas"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":14,"docid":"NYSE_SLB_2018#p14","snippet":"service and WellWatcher Stim* stimulation monitoring service make it possible to maintain the productivity of existing wells while avoiding detrimental parent-child well interactions. For a customer in North Dakota, BroadBand Shield service helped overcome such an interaction during the stimulation of a child well, saving approximately $400,000 in intervention costs and more than two weeks of defe"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":15,"docid":"NYSE_SLB_2018#p15","snippet":"## Digitally Enabled Well Testing\n\nWhen we look to new sources of oil to meet demand and replace reserves, we must first confirm a reservoir’s capacity to produce oil and gas by conducting well tests. The results of these tests affect the accuracy of oil reserve estimates and help determine the efficiency of hydrocarbon recovery. However, conventional well testing presents several challenges—from "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":16,"docid":"NYSE_SLB_2018#p16","snippet":"![](images/16_0.jpg)\n\nDigital technology enables field personnel access to critical information during operations. OneSurface engineers use a handheld device to assess dynamic changes in fluid flow inside the hydrocarbon processing plant.\n\n## Integrated Production Systems\n\nA production system often requires several years to design and build, which delays the time to first oil. And because it is in"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":17,"docid":"NYSE_SLB_2018#p17","snippet":"## Schlumberger Production Management\n\nAlthough most of our work is performed under a standard single-product-line contract in which we price our technologies separately, we can also provide technical support during the different phases of a customer's project. This begins with our Integrated Services Management (ISM) for which specially trained project managers provide scheduling, planning, and a"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":18,"docid":"NYSE_SLB_2018#p18","snippet":"![](images/18_0.jpg)\n\nStakeholders discuss how the HiWAY flow-channel fracturing system can decrease not only water usage but also proppant quantities and wellsite equipment requirements—all of which reduces truck traffic and \\( CO_{2} \\) emissions. The image on the monitor shows the overall reduction in environmental footprint by adopting the optimized case (in blue) versus the conventional met"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":19,"docid":"NYSE_SLB_2018#p19","snippet":"## The Key to Long-Term Success\n\nSchlumberger firmly believes that technology drives E&P performance. For more than 90 years, we have used our innovative technology and reservoir domain expertise to deliver solutions that help improve our customers' performance. Now, with the large amount of data generated from oilfield operations, we are pairing our domain knowledge and expertise with data-driven"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":20,"docid":"NYSE_SLB_2018#p20","snippet":"## 2018 Form 10-K\nSchlumberger Limited"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":22,"docid":"NYSE_SLB_2018#p22","snippet":"# UNITED STATES\nSECURITIES AND EXCHANGE COMMISSION\nWashington, D.C. 20549\n\nForm 10-K\n\n(Mark One)\n\n☑ ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934\n\nFor the fiscal year ended December 31, 2018\n\nOR\n\n☐ TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934\n\nFor the transition period from ___ to ___\nCommission File Number 1-4601\n\n"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":23,"docid":"NYSE_SLB_2018#p23","snippet":"## SCHLUMBERGER LIMITED\nTable of Contents\nForm 10-K\n\nPART I\nItem 1. Business ..... 3\nItem 1A. Risk Factors ..... 9\nItem 1B. Unresolved Staff Comments ..... 12\nItem 2. Properties ..... 12\nItem 3. Legal Proceedings ..... 13\nItem 4. Mine Safety Disclosures ..... 13\nPART II\nItem 5. Market for Schlumberger's Common Stock, Related Stockholder Matters and Issuer Purchases of Equity Securities ..... 14\nIt"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":24,"docid":"NYSE_SLB_2018#p24","snippet":"## PART I\n\n## Item 1. Business.\n\nAll references in this report to “Registrant,” “Company,” “Schlumberger,” “we” or “our” are to Schlumberger Limited (Schlumberger N.V., incorporated in Curaçao) and its consolidated subsidiaries.\n\nFounded in 1926, Schlumberger is the world’s leading provider of technology for reservoir characterization, drilling, production and processing to the oil and gas industr"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":25,"docid":"NYSE_SLB_2018#p25","snippet":"Drilling – Consists of the principal Technologies involved in the drilling and positioning of oil and gas wells and comprises Bits & Drilling Tools, M-I SWACO, Drilling & Measurements, Land Rigs and Integrated Drilling Services (“IDS”).\n\n- Bits & Drilling Tools designs, manufactures and markets roller cone and fixed cutter drill bits for all environments. The drill bits include designs for premium"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":26,"docid":"NYSE_SLB_2018#p26","snippet":"SPM creates alignment between Schlumberger and the asset holder and/or the operator whereby Schlumberger receives remuneration in line with its value creation. These projects are generally focused on developing and co-managing production of customer assets under long-term agreements. Schlumberger will invest its own services and products, and in some cases cash, into the field development activiti"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":27,"docid":"NYSE_SLB_2018#p27","snippet":"facilities as well as research centers are shared, and the labor force is interchangeable. Technological innovation, quality of service and price differentiation are the principal methods of competition, which vary geographically with respect to the different services and products offered. While Schlumberger has numerous competitors, both large and small, Schlumberger believes it is an industry le"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":28,"docid":"NYSE_SLB_2018#p28","snippet":"
NameAgeCurrent Position and Five-Year Business Experience
Jean-Francois Poupeau57Executive Vice President Corporate Engagement, since May 2017; Executive Vice President Corporate Development and Communications, June 2012 to April 2017.
Patrick Schorn50Executive Vice President, Wells, since May 20"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":29,"docid":"NYSE_SLB_2018#p29","snippet":"
NameAgeCurrent Position and Five-Year Business Experience
Olivier Le Peuch55Executive Vice President Reservoir and Infrastructure, since May 2018; President, Cameron Group, February 2017 to May 2018; President, Completions October 2014 to January 2017; Vice President EMS, August 2010 to September 2014.
Guy Arringt"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":30,"docid":"NYSE_SLB_2018#p30","snippet":"## Item 1A. Risk Factors.\n\nThe following discussion of risk factors known to us contains important information for the understanding of our “forward-looking statements,” which are discussed immediately following Item 7A. of this Form 10-K and elsewhere. These risk factors should also be read in conjunction with Item 7. Management’s Discussion and Analysis of Financial Condition and Results of Oper"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":31,"docid":"NYSE_SLB_2018#p31","snippet":"A significant portion of our revenue is derived from our non-United States operations, which exposes us to risks inherent in doing business in each of the over 85 countries in which we operate.\n\nOur non-United States operations accounted for approximately 69% of our consolidated revenue in 2018, 74% in 2017 and 80% in 2016. Operations in countries other than the United States are subject to variou"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":32,"docid":"NYSE_SLB_2018#p32","snippet":"hydraulic fracturing. Hydraulic fracturing is a stimulation treatment routinely performed on oil and gas wells in low-permeability reservoirs. Specially engineered fluids are pumped at high pressure and rate into the reservoir interval to be treated, causing cracks in the target formation. Proppant, such as sand of a particular size, is mixed with the treatment fluid to keep the cracks open when t"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":33,"docid":"NYSE_SLB_2018#p33","snippet":"market share, and negotiate acceptable contract terms with our customers. If we are unable to continue to develop and produce competitive technology or deliver it to our clients in a timely and cost-competitive manner in the various markets we serve, it could adversely affect our financial condition, results of operations and cash flows.\n\nLimitations on our ability to protect our intellectual prop"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":34,"docid":"NYSE_SLB_2018#p34","snippet":"offices and warehouses throughout the world. Schlumberger views its principal manufacturing, mining and processing facilities, research centers and data processing centers as its “principal owned or leased facilities.”\n\nThe following sets forth Schlumberger’s principal owned or leased facilities:\n\nTaubate, Brazil; Beijing and Shanghai, China; Clamart, France; Pune, India; Johor, Malaysia; Veracruz"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":35,"docid":"NYSE_SLB_2018#p35","snippet":"## PART II\n\nItem 5. Market for Schlumberger’s Common Stock, Related Stockholder Matters and Issuer Purchases of Equity Securities.\n\nAs of December 31, 2018, there were 26,720 stockholders of record. The principal United States market for Schlumberger’s common stock is the New York Stock Exchange (“NYSE”), where it is traded under the symbol “SLB.”\n\nThe following graph compares the cumulative total"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":36,"docid":"NYSE_SLB_2018#p36","snippet":"Schlumberger’s common stock repurchase program activity for the three months ended December 31, 2018 was as follows:\n\n(Stated in thousands, except per share amounts)\n\n
Total Number of Shares PurchasedAverage price Paid per ShareTotal Number of Shares Purchased as Part of Publicly Announced ProgramMaximum Value of Shares that may yet be Purchased Un"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":37,"docid":"NYSE_SLB_2018#p37","snippet":"## Item 6. Selected Financial Data.\n\nThe following selected consolidated financial data should be read in conjunction with both “Item 7. Management’s Discussion and Analysis of Financial Condition and Results of Operations” and “Item 8. Financial Statements and Supplementary Data” of this Form 10-K in order to understand factors, such as business combinations and charges and credits, which may aff"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":38,"docid":"NYSE_SLB_2018#p38","snippet":"## Item 7. Management’s Discussion and Analysis of Financial Condition and Results of Operations.\n\nThe following discussion and analysis contains forward-looking statements, including, without limitation, statements relating to our plans, strategies, objectives, expectations, intentions and resources. Such forward-looking statements should be read in conjunction with our disclosures under “Item 1A"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":39,"docid":"NYSE_SLB_2018#p39","snippet":"full effect; the effect of lower activity in North America land in the second half of 2018 impacts production growth; the dispensations from the Iran export sanctions expire and are not renewed; and as the US and China continue to work toward a solution to their ongoing trade dispute.\n\nIn the meantime, the recent oil price volatility has introduced more uncertainty around the global exploration an"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":40,"docid":"NYSE_SLB_2018#p40","snippet":"Fourth-quarter revenue of \\(8.2 billion declined 4% sequentially driven by lower activity and pricing for most Production- and Cameron-related businesses in North America land. Lower revenue from OneSubsea also contributed to the decline. International activity remained resilient despite the oil price drop, with revenue increasing 1% sequentially. The seasonal slowdown in Russia was offset by incr"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":41,"docid":"NYSE_SLB_2018#p41","snippet":"Full-Year 2018 Results\n\n
20182017
RevenueIncome Before TaxesRevenueIncome Before Taxes
Reservoir Characterization\\( 6,526\\) 1,392\\( 6,795\\) 1,244
Drilling9,2501,239"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":42,"docid":"NYSE_SLB_2018#p42","snippet":"Year-on-year, pretax operating margin increased 303 bps to 21% primarily as a result of reduced depreciation and amortization following the WesternGeco impairment charges recorded in the fourth quarter of 2017.\n\n## Drilling\n\nFull-year 2018 revenue of \\(9.3 billion increased 10% year-on-year primarily due to higher demand for directional drilling technologies on land in North America and the start "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":43,"docid":"NYSE_SLB_2018#p43","snippet":"(1) Comprised principally of certain corporate expenses not allocated to the segments, stock-based compensation costs, amortization expense associated with certain intangible assets, certain centrally managed initiatives and other nonoperating items. Full-year 2017 and 2016 include \\(252 million and \\)189 million, respectively, of amortization expense associated with intangible assets recorded as "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":44,"docid":"NYSE_SLB_2018#p44","snippet":"Year-on-year, pretax operating margin of 14% decreased 142 bps as a result of lower Drilling Systems project volumes.\n\n## Interest and Other Income\n\nInterest & other income consisted of the following:\n\n<"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":47,"docid":"NYSE_SLB_2018#p47","snippet":"Details of the components of liquidity as well as changes in liquidity follow:\n\n(Stated in millions)\n\n
201820172016
Interest income\\( 60\\) 128$ 110
Earnings of equity method investments89
PretaxTaxNet
Impairment & other
Components of Liquidity:Dec. 31, 2018Dec. 31, 2017Dec. 31, 2016
Cash\\( 1,433\\) 1,799\\( 2,929
Short-term investments1,3443,2906,328
Fixed income investm"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":48,"docid":"NYSE_SLB_2018#p48","snippet":"(1) “Net Debt” represents gross debt less cash, short-term investments and fixed income investments, held to maturity. Management believes that Net Debt provides useful information regarding the level of Schlumberger’s indebtedness by reflecting cash and investments that could be used to repay debt. Net Debt is a non-GAAP financial measure that should be considered in addition to, not as a substit"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":49,"docid":"NYSE_SLB_2018#p49","snippet":"- During the fourth quarter of 2017, Schlumberger issued \\(500 million of 2.20% Guaranteed Notes due 2020 and \\)600 million of 2.65% Guaranteed Notes due 2022.\n\n- During 2018, 2017 and 2016, Schlumberger made contributions of \\(83 million, \\)133 million and \\(174 million, respectively, to its postretirement benefit plans. The US pension plans were 88% funded at both December 31, 2018 and December "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":50,"docid":"NYSE_SLB_2018#p50","snippet":"## Summary of Contractual Obligations\n\n(Stated in millions)\n\n
TotalPayment Period
20192020-20212022-2023After 2023
Debt \\( ^{(1)} \\)16,0511,4085,1866,5582,899
Interest on fixed rate debt obli"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":51,"docid":"NYSE_SLB_2018#p51","snippet":"## Allowance for Doubtful Accounts\n\nSchlumberger maintains an allowance for doubtful accounts in order to record accounts receivable at their net realizable value. Judgment is involved in recording and making adjustments to this reserve. Allowances have been recorded for receivables believed to be uncollectible, including amounts for the resolution of potential credit and other collection issues s"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":52,"docid":"NYSE_SLB_2018#p52","snippet":"recoverable. In reviewing for impairment, the carrying value of such assets is compared to the estimated undiscounted future cash flows expected from the use of the assets and their eventual disposition. If such cash flows are not sufficient to support the asset’s recorded value, an impairment charge is recognized to reduce the carrying value of the long-lived asset to its estimated fair value. Th"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":53,"docid":"NYSE_SLB_2018#p53","snippet":"## Pension and Postretirement Benefits\n\nSchlumberger’s pension and postretirement benefit obligations are described in detail in Note 18 to the Consolidated Financial Statements. The obligations and related costs are calculated using actuarial concepts, which include critical assumptions related to the discount rate, expected rate of return on plan assets and medical cost trend rates. These assump"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":54,"docid":"NYSE_SLB_2018#p54","snippet":"The following illustrates the sensitivity to changes in certain assumptions, holding all other assumptions constant, for Schlumberger’s United States postretirement medical plans:\n\n<"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":55,"docid":"NYSE_SLB_2018#p55","snippet":"## Item 7A. Quantitative and Qualitative Disclosures About Market Risk.\n\nSchlumberger is subject to market risks primarily associated with changes in foreign currency exchange rates and interest rates.\n\nAs a multinational company, Schlumberger operates in more than 85 countries. Schlumberger’s functional currency is primarily the US dollar. Approximately 80% of Schlumberger’s revenue in 2018 was d"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":56,"docid":"NYSE_SLB_2018#p56","snippet":"The following table reflects the carrying amounts of Schlumberger’s debt at December 31, 2018 by year of maturity:\n\n
(Stated in millions)
Effect on 2018 Pretax ExpenseEffect on Dec. 31, 2018 Liability
Change in Assumption
(Stated in millions)
20192020202120222023202420252026ThereafterTotal
Fixed rate debt"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":57,"docid":"NYSE_SLB_2018#p57","snippet":"natural gas exploration and development; general economic, political and business conditions in key regions of the world; foreign currency risk; pricing pressure; weather and seasonal factors; operational modifications, delays or cancellations; production declines; changes in government regulations and regulatory requirements, including those related to offshore oil and gas exploration, radioactiv"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":58,"docid":"NYSE_SLB_2018#p58","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nCONSOLIDATED STATEMENT OF INCOME (LOSS)\n\n"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":59,"docid":"NYSE_SLB_2018#p59","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nCONSOLIDATED STATEMENT OF COMPREHENSIVE INCOME (LOSS)\n\n(Stated in millions)\n\n
Year Ended December 31,201820172016
Revenue
Services\\( 24,296\\) 21,927\\( 20,259
Product sales8,5198,5137,551
Total Revenue
Year Ended December 31,201820172016
Net income (loss)\\( 2,177\\) (1,513)$ (1,627)
Currency translation adjustments
Net change arising du"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":60,"docid":"NYSE_SLB_2018#p60","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nCONSOLIDATED BALANCE SHEET\n\n(Stated in millions)\n\n
December 31,20182017
ASSETS
Current Assets
Cash\\( 1,433\\) 1,799
Short-term investments1,3443,290
Receivables less allow"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":61,"docid":"NYSE_SLB_2018#p61","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nCONSOLIDATED STATEMENT OF CASH FLOWS\n\n
Year Ended December 31,201820172016
Cash flows from operating activities:
Net income (loss)\\( 2,177\\) (1,513)\\( (1,627)
Adjustments to reconcile net income (loss) to cash pro"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":62,"docid":"NYSE_SLB_2018#p62","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nCONSOLIDATED STATEMENT OF STOCKHOLDERS' EQUITY\n\n(Stated in millions)\n\n
Common StockRetained EarningsAccumulated Other Comprehensive LossNoncontrolling InterestsTotal
IssuedIn Treasury
B"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":63,"docid":"NYSE_SLB_2018#p63","snippet":"## SCHLUMBERGER LIMITED AND SUBSIDIARIES\nSHARES OF COMMON STOCK\n\n(Stated in millions)\n\n
IssuedIn TreasuryShares Outstanding
Balance, January 1, 20161,434(178)1,256
Acquisition of Cameron International Corporation-138138
Shares sold to optionees, less sha"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":64,"docid":"NYSE_SLB_2018#p64","snippet":"# Notes to Consolidated Financial Statements\n\n## 1. Business Description\n\nSchlumberger Limited (Schlumberger N.V., incorporated in Curaçao) and its consolidated subsidiaries (collectively, “Schlumberger”) comprise the world’s leading supplier of technology for reservoir characterization, drilling, production and processing to the oil and gas industry.\n\n## 2. Summary of Accounting Policies\n\nThe Con"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":65,"docid":"NYSE_SLB_2018#p65","snippet":"incurred to date on the project in relation to total estimated project costs. The estimate of total project costs has a significant impact on both the amount of revenue recognized as well as the related profit on a project. Revenue and profits on contracts can also be significantly affected by change orders and claims. Due to the nature of these projects, adjustments to estimates of contract reven"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":66,"docid":"NYSE_SLB_2018#p66","snippet":"compensated based upon cash flow generated or on a fee-per-barrel basis. This includes certain arrangements whereby Schlumberger is only compensated based upon incremental production it helps deliver above a mutually agreed baseline. Revenue from SPM arrangements, which is recognized as the related production is achieved, represented less than 5% of Schlumberger’s consolidated revenue during each "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":67,"docid":"NYSE_SLB_2018#p67","snippet":"## Earnings per Share\n\nThe following is a reconciliation from basic to diluted earnings (loss) per share of Schlumberger for each of the last three years:\n\n"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":68,"docid":"NYSE_SLB_2018#p68","snippet":"- During the fourth quarter of 2018, Schlumberger recorded \\(172 million of charges to fully impair certain long-lived assets. This amount is classified in Impairments & other in the Consolidated Statement of Income (Loss).\n\n- During the second quarter of 2018, Schlumberger recorded a \\(184 million charge associated with workforce reductions, primarily to further streamline its support cost struct"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":69,"docid":"NYSE_SLB_2018#p69","snippet":"(Loss), consists of two components: (i) a \\(410 million charge relating to the one-time mandatory tax on previously deferred earnings of certain non-US subsidiaries that are owned either wholly or partially by a US subsidiary of Schlumberger, and (ii) a \\)334 million credit resulting from the remeasurement of Schlumberger's net deferred tax liabilities in the US based on the new lower corporate in"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":70,"docid":"NYSE_SLB_2018#p70","snippet":"- Schlumberger reduced its workforce during the second quarter of 2016 as a result of persistent unfavorable oil and gas industry market conditions and the expected impact on customer activity levels. As a result, Schlumberger recorded a \\(646 million charge during the second quarter of 2016. During the fourth quarter of 2016, Schlumberger further reduced its workforce in order to streamline its s"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":71,"docid":"NYSE_SLB_2018#p71","snippet":"The following is a summary of these charges and credits, of which $3.172 billion were classified as Impairments & other, $349 million were classified as Merger & integration and $299 million were classified in Cost of sales in the Consolidated Statement of Income (Loss):\n\n(Stated in millions)\n\n
(Stated in millions, except per share amounts)
Net Income (Loss) Attributable to SchlumbergerAverage Shares OutstandingEarnings (Loss) per Share
PretaxTaxNet
Impairment & other
(stated in millions, except exchange ratio and per share amounts)
Equity consideration:
Number of shares of Cameron stock outstanding192
Ex"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":73,"docid":"NYSE_SLB_2018#p73","snippet":"## Allocation of Consideration Transferred to Net Assets Acquired\n\nThe following amounts represent the fair value of assets acquired and liabilities assumed in the merger.\n\n
Cash\\( 785
Short-term investments1,448
Accounts receivable1,669
Inventories (1)2,350
Fixed assets1,"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":74,"docid":"NYSE_SLB_2018#p74","snippet":"## Supplemental Pro Forma Financial Information\n\nCameron’s results of operations have been included in Schlumberger’s financial statements for periods subsequent to the closing of the acquisition on April 1, 2016. Businesses acquired from Cameron contributed revenues of approximately \\(4 billion and pretax operating income of approximately \\)0.7 billion for the period from April 1, 2016 through De"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":75,"docid":"NYSE_SLB_2018#p75","snippet":"## 6. Fixed Assets\n\nFixed assets consist of the following:\n\n
20182017
Land\\( 462\\) 428
Buildings & improvements5,5345,122
Machinery & equipment32,66832,160
Seismic vessels-103
38,66437,"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":76,"docid":"NYSE_SLB_2018#p76","snippet":"## 8. Goodwill\n\nThe changes in the carrying amount of goodwill by segment were as follows:\n\n(Stated in millions)\n\n
Reservoir CharacterizationDrillingProductionCameronTotal
Balance, January 1, 2017\\( 4,820\\) 10,114\\( 4,639\\) 5,417\\( 24,990
Acquisitions21"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":77,"docid":"NYSE_SLB_2018#p77","snippet":"## 10. Long-term Debt and Debt Facility Agreements\n\nLong-term Debt consists of the following:\n\n
20182017
4.00% Senior Notes due 2025\\( 1,742\\) 1,741
3.30% Senior Notes due 20211,5961,595
3.00% Senior Notes due 20201,5961,593
3.65% Senior Notes du"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":78,"docid":"NYSE_SLB_2018#p78","snippet":"which \\(1.7 billion was classified within Long-term debt and \\)1.3 billion was classified in Short-term borrowings and current portion of long-term debt in the Consolidated Balance Sheet.\n\nThe weighted average interest rate on variable rate debt as of December 31, 2018 was 3.5%.\n\nLong-term Debt as of December 31, 2018 is due as follows: \\(2.1 billion in 2020, \\)3.1 billion in 2021, $4.4 billion in"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":79,"docid":"NYSE_SLB_2018#p79","snippet":"foreign currencies. Therefore, when the US dollar weakens (strengthens) in relation to the foreign currencies of the countries in which Schlumberger conducts business, the US dollar-reported expenses will increase (decrease).\n\nSchlumberger is exposed to risks on future cash flows to the extent that the local currency is not the functional currency and expenses denominated in local currency are not"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":80,"docid":"NYSE_SLB_2018#p80","snippet":"The effect of derivative instruments designated as fair value hedges and those not designated as hedges on the Consolidated Statement of Income (Loss) was as follows:\n\n
(Stated in millions)
Gain (Loss) Recognized in Income (Loss)2016Consolidated Statement of Income (Loss) Classific"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":81,"docid":"NYSE_SLB_2018#p81","snippet":"Accumulated Other Comprehensive Loss consists of the following:\n\n(Stated in millions)\n\n
Currency Translation AdjustmentsMarketable SecuritiesCash Flow HedgesPension and Other Postretirement Benefit PlansTotal
Balance, January 1, 2016\\( (2,053)-\\) (39)\\( (2,466)\\) (4,558)
201820172016
Dividend yield2.6%2.3%2.7%
Expected volatility26%
201820172016
Stock options\\(134\\)161\\(175
Restricted stock179148<"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":85,"docid":"NYSE_SLB_2018#p85","snippet":"The above deferred tax balances at December 31, 2018 and 2017 were net of valuation allowances relating to net operating losses in certain countries of $87 million and $119 million, respectively.\n\nSchlumberger generally does not provide for taxes related to its undistributed earnings because such earnings either would not be taxable when remitted or they are considered to be indefinitely reinveste"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":86,"docid":"NYSE_SLB_2018#p86","snippet":"A reconciliation of the beginning and ending amount of liabilities associated with uncertain tax positions for the years ended December 31, 2018, 2017 and 2016 is as follows:\n\n(Stated in millions)\n\n
201820172016
Balance at beginning of year\\( 1,393\\) 1,419$ 1,285
Additions based on tax positions r"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":87,"docid":"NYSE_SLB_2018#p87","snippet":"Schlumberger elected the package of practical expedients permitted under the transition guidance within the new standard which, among other things, allows companies to carry forward their historical lease classification.\n\nSchlumberger’s leasing activities primarily consist of operating leases for administrative offices, manufacturing facilities, research centers, service centers, sales offices and"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":88,"docid":"NYSE_SLB_2018#p88","snippet":"## 17. Segment Information\n\nSchlumberger’s segments are as follows:\n\n- Reservoir Characterization – Consists of the principal Technologies involved in finding and defining hydrocarbon resources. These include WesternGeco, Wireline, Testing Services, OneSurface, Software Integrated Solutions and Integrated Services Management.\n\n- Drilling – Consists of the principal Technologies involved in the dri"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":89,"docid":"NYSE_SLB_2018#p89","snippet":"
2017
RevenueIncome Before TaxesAssetsDepreciation and AmortizationCapital Expenditures
Reservoir Characterization\\( 6,795\\) 1,244\\( 4,892\\) 989\\( 305
Drilling8,3921,1515,513
20182017
North America\\(5,715\\)5,121
Latin America8981,042
Europe/CIS/Africa2,3642,545
M"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":92,"docid":"NYSE_SLB_2018#p92","snippet":"The weighted-average assumed discount rate and compensation increases used to determine the projected benefit obligations for the US and International plans were as follows:\n\n"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":97,"docid":"NYSE_SLB_2018#p97","snippet":"In addition to providing defined pension benefits and a postretirement medical plan, Schlumberger has other deferred benefit programs, primarily profit sharing and defined contribution pension plans. Expenses for these programs were \\(435 million, \\)413 million and $445 million in 2018, 2017 and 2016, respectively.\n\n## 19. Supplementary Information\n\nCash paid (refunded) for interest and income tax"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":98,"docid":"NYSE_SLB_2018#p98","snippet":"## Management’s Report on Internal Control Over Financial Reporting\n\nSchlumberger management is responsible for establishing and maintaining adequate internal control over financial reporting as defined in Rule 13a–15(f) of the Securities Exchange Act of 1934, as amended (the \"Exchange Act\"). Schlumberger's internal control over financial reporting is a process designed to provide reasonable assur"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":99,"docid":"NYSE_SLB_2018#p99","snippet":"## Report of Independent Registered Public Accounting Firm\n\nTo the Board of Directors and Stockholders of Schlumberger Limited\n\n## Opinions on the Financial Statements and Internal Control over Financial Reporting\n\nWe have audited the accompanying consolidated balance sheets of Schlumberger Limited and its subsidiaries (“the Company”) as of December 31, 2018 and 2017, and the related consolidated "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":100,"docid":"NYSE_SLB_2018#p100","snippet":"accordance with generally accepted accounting principles. A company’s internal control over financial reporting includes those policies and procedures that (i) pertain to the maintenance of records that, in reasonable detail, accurately and fairly reflect the transactions and dispositions of the assets of the company; (ii) provide reasonable assurance that transactions are recorded as necessary to"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":101,"docid":"NYSE_SLB_2018#p101","snippet":"## Quarterly Results\n(Unaudited)\n\nThe following table summarizes Schlumberger’s results by quarter for the years ended December 31, 2018 and 2017.\n\n(Stated in millions, except per share amounts)\n\n
USInternational
2018201720182017
Discount rate4.30%3.70%4.00%
20182017
TotalLevel OneLevel TwoLevel ThreeTotalLevel OneLevel TwoLevel Three
Asset Category:
20182017
Change in Projected Benefit Obligations
Benefit obligation at beginning of year\\( 1,213\\) 1,108
Service cost3229
Revenue (2)Gross Margin (1), (2)Net Income (Loss) Attributable to Schlumberger (2)Earnings pe"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":102,"docid":"NYSE_SLB_2018#p102","snippet":"recorded, processed, summarized and reported within the time periods specified in the Securities and Exchange Commission’s rules and forms. Schlumberger’s disclosure controls and procedures include controls and procedures designed so that information required to be disclosed in reports filed or submitted under the Exchange Act is accumulated and communicated to its management, including the CEO an"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":103,"docid":"NYSE_SLB_2018#p103","snippet":"## PART III\n\n## Item 10. Directors, Executive Officers and Corporate Governance of Schlumberger.\n\nSee “Item 1. Business–Executive Officers of Schlumberger” of this Report for Item 10 information regarding executive officers of Schlumberger. The information under the captions “Election of Directors,” “Section 16(a) Beneficial Ownership Reporting Compliance,” “Corporate Governance–Director Nominatio"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":104,"docid":"NYSE_SLB_2018#p104","snippet":"## PART IV\n\n## Item 15. Exhibits and Financial Statement Schedules.\n\n(a) The following documents are filed as part of this Report:\n\nPage(s)\n(1) Financial Statements\nConsolidated Statement of Income (Loss) for the three years ended December 31, 2018 ..... 37\nConsolidated Statement of Comprehensive Income (Loss) for the three years ended December 31, 2018 ..... 38\nConsolidated Balance Sheet at Decem"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":105,"docid":"NYSE_SLB_2018#p105","snippet":"## INDEX TO EXHIBITS\n\nArticles of Incorporation of Schlumberger Limited (Schlumberger N.V.), as amended on April 6, 2016 (incorporated by reference to Exhibit 3.1 to Schlumberger's Current Report on Form 8-K filed on April 6, 2016)\n\nAmended and Restated By-Laws of Schlumberger Limited (Schlumberger N.V.), as amended on January 19, 2017 (incorporated by reference to Exhibit 3.1 to Schlumberger's Cu"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":106,"docid":"NYSE_SLB_2018#p106","snippet":"Amended and Restated French Sub Plan for Restricted Units (incorporated by reference to Appendix B of Schlumberger’s Definitive Proxy Statement filed with the SEC on March 2, 2018)\n\nForm of Option Agreement (Employees in France), Incentive Stock Option, under Schlumberger 2010 Omnibus Stock Incentive Plan (incorporated by reference to Exhibit 10.10 to Schlumberger's Quarterly Report on Form 10-Q f"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":107,"docid":"NYSE_SLB_2018#p107","snippet":"Exhibit\nForm of 2017 Three-Year Performance Share Unit Award Agreement under Schlumberger 2013 10.25\nOmnibus Stock Incentive Plan (incorporated by reference to Exhibit 10.2 to Schlumberger's Quarterly Report on Form 10-Q for the quarter ended March 31, 2017) (+)\nForm of 2018 French Qualified Performance Share Unit Award Agreement under Schlumberger 2010 10.26\nOmnibus Stock Incentive Plan (*) (+)\nA"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":108,"docid":"NYSE_SLB_2018#p108","snippet":"## SIGNATURES\n\nPursuant to the requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934, the Registrant has duly caused this Report to be signed on its behalf by the undersigned, thereunto duly authorized.\nDate: January 23, 2019\n\nSCHLUMBERGER LIMITED\n\nBy: /s/ HOWARD GUILD\nHoward Guild\nChief Accounting Officer\n\nPursuant to the requirements of the Securities Exchange Act of 1934, t"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":109,"docid":"NYSE_SLB_2018#p109","snippet":"## Significant Subsidiaries\n\nListed below are the significant subsidiaries of the Registrant as of December 31, 2018, and the states or jurisdictions in which they are incorporated or organized. The indentation reflects the principal parenting of each subsidiary. The names of other subsidiaries have been omitted from the list below, since they would not constitute, in the aggregate, a significant "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":110,"docid":"NYSE_SLB_2018#p110","snippet":"## Consent of Independent Registered Public Accounting Firm\n\nWe hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (Nos. 333-36366; 333-104225; 333-115277; 333-124534; 333-151920; 333-173055, as amended by post-effective amendment on Form S-8; 333-188589; 333-188590; 333-218181; and 333-218182); on Form S-3 (No.333-221161); on Form S-4 (No. 333-97899); and "} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":111,"docid":"NYSE_SLB_2018#p111","snippet":"## Powers of Attorney\n\nEach of the undersigned, in the capacity or capacities set forth below his or her signature as a member of the Board of Directors and/or an officer of Schlumberger Limited, a Curaçao corporation, hereby appoints Simon Ayat, Howard Guild and Alexander C. Juden, or any of them, the attorney or attorneys of the undersigned, with full power of substitution and revocation, for an"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":112,"docid":"NYSE_SLB_2018#p112","snippet":"# CERTIFICATION OF CHIEF EXECUTIVE OFFICER\n\nI, Paal Kibsgaard, certify that:\n\n1. I have reviewed this Annual Report on Form 10-K of Schlumberger Limited;\n\n2. Based on my knowledge, this report does not contain any untrue statement of a material fact or omit to state a material fact necessary to make the statements made, in light of the circumstances under which such statements were made, not misle"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":113,"docid":"NYSE_SLB_2018#p113","snippet":"# CERTIFICATION OF CHIEF FINANCIAL OFFICER\n\nI, Simon Ayat, certify that:\n\n1. I have reviewed this Annual Report on Form 10-K of Schlumberger Limited;\n\n2. Based on my knowledge, this report does not contain any untrue statement of a material fact or omit to state a material fact necessary to make the statements made, in light of the circumstances under which such statements were made, not misleadin"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":114,"docid":"NYSE_SLB_2018#p114","snippet":"# CERTIFICATION OF CHIEF EXECUTIVE OFFICER\nPURSUANT TO\n18 U.S.C. SECTION 1350\nAS ADOPTED PURSUANT TO\nSECTION 906 OF THE SARBANES-OXLEY ACT OF 2002\n\nIn connection with the Annual Report on Form 10-K of Schlumberger N.V. (Schlumberger Limited) (the \"Company\") for the year ended December 31, 2018 as filed with the Securities and Exchange Commission on the date hereof (the \"Report\"), I, Paal Kibsgaard"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":115,"docid":"NYSE_SLB_2018#p115","snippet":"# CERTIFICATION OF CHIEF FINANCIAL OFFICER\nPURSUANT TO\n18 U.S.C. SECTION 1350\nAS ADOPTED PURSUANT TO\nSECTION 906 OF THE SARBANES-OXLEY ACT OF 2002\n\nIn connection with the Annual Report on Form 10-K of Schlumberger N.V. (Schlumberger Limited) (the \"Company\") for the year ended December 31, 2018 as filed with the Securities and Exchange Commission on the date hereof (the \"Report\"), I, Simon Ayat, Ex"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":116,"docid":"NYSE_SLB_2018#p116","snippet":"## Mine Safety Disclosure\n\nThe following disclosure is provided pursuant to Section 1503(a) of the Dodd-Frank Wall Street Reform and Consumer Protection Act, which requires certain disclosures by companies required to file periodic reports under the Securities Exchange Act of 1934, as amended, that operate mines regulated under the Federal Mine Safety and Health Act of 1977.\n\nThe table that follow"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":117,"docid":"NYSE_SLB_2018#p117","snippet":"## Board of Directors\n\nPeter L.S. Currie \\( ^{2,4} \\) \nPresident, Currie Capital LLC\nPalo Alto, California\n\nV. Maureen Kempston Darkes \\( ^{1,3} \\) \nFormer Group Vice President\nGeneral Motors Corporation\nDetroit, Michigan\n\nMiguel M. Galuccio 3,5\nChairman and\nChief Executive Officer\nVista Oil and Gas\nMexico City, Mexico\n\nPaal Kibsgaard\nChairman and Chief Executive Officer\nSchlumberger\n\nNikolay Kudr"} +{"report":"NYSE_SLB_2018","exchange":"NYSE","ticker":"SLB","year":2018,"page":118,"docid":"NYSE_SLB_2018#p118","snippet":"## Schlumberger Limited\n\n42 rue Saint-Dominique\n75007 Paris\nFrance\n\n5599 San Felipe\nHouston, Texas 77056\nUnited States\n\n62 Buckingham Gate\nLondon SW1E 6AJ\nUnited Kingdom\n\nParkstraat 83\n2514 JG The Hague\nThe Netherlands\n\nwww.slb.com"} diff --git a/retrieval/retrieval.py b/retrieval/retrieval.py index ed1d2bb..b68860f 100644 --- a/retrieval/retrieval.py +++ b/retrieval/retrieval.py @@ -184,8 +184,13 @@ def from_segment(cls, ref: ReportRef, page: NonNeg, segment: str) -> Page | None if not text: return None return cls( - ref.report, ref.exchange, ref.ticker, ref.year, - page, f"{ref.report}#p{page}", text, + ref.report, + ref.exchange, + ref.ticker, + ref.year, + page, + f"{ref.report}#p{page}", + text, ) @@ -198,8 +203,15 @@ class DocRecord(PageMeta): @classmethod def from_page(cls, p: Page, snippet_chars: NonNeg) -> DocRecord: - return cls(p.report, p.exchange, p.ticker, p.year, p.page, p.docid, - p.text[:snippet_chars]) + return cls( + p.report, + p.exchange, + p.ticker, + p.year, + p.page, + p.docid, + p.text[:snippet_chars], + ) @classmethod def from_json(cls, line: bytes) -> DocRecord: @@ -250,8 +262,13 @@ class ScoredHit: doc: DocRecord @classmethod - def at(cls, rank: Positive, docid: DocId, score: float, - docstore: dict[DocId, DocRecord]) -> ScoredHit: + def at( + cls, + rank: Positive, + docid: DocId, + score: float, + docstore: dict[DocId, DocRecord], + ) -> ScoredHit: rec = docstore.get(docid) if rec is None: raise KeyError( @@ -286,8 +303,13 @@ class Layout: @classmethod def under(cls, output_dir: Path, method: Method) -> Layout: base = output_dir / method - return cls(base / "index", base / "ids.json", base / "docstore.jsonl", - base / "run.trec", base / "results.jsonl") + return cls( + base / "index", + base / "ids.json", + base / "docstore.jsonl", + base / "run.trec", + base / "results.jsonl", + ) # --- discovery + page iteration --------------------------------------------- # @@ -303,14 +325,17 @@ def discover_mmd(root: Path) -> dict[str, tuple[ReportRef, Path]]: if ref is None: continue cur = chosen.get(ref.report) - if cur is None or (cur[1].stem.endswith("_det") - and not Path(fn).stem.endswith("_det")): + if cur is None or ( + cur[1].stem.endswith("_det") and not Path(fn).stem.endswith("_det") + ): chosen[ref.report] = (ref, Path(dirpath) / fn) return chosen @beartype -def iter_pages(root: Path, marker_re: re.Pattern, limit: Positive | None) -> Iterator[Page]: +def iter_pages( + root: Path, marker_re: re.Pattern, limit: Positive | None +) -> Iterator[Page]: """Yield one ``Page`` per non-empty page of every discovered report.""" chosen = discover_mmd(root) names = sorted(chosen)[:limit] if limit is not None else sorted(chosen) @@ -318,8 +343,11 @@ def iter_pages(root: Path, marker_re: re.Pattern, limit: Positive | None) -> Ite for report in names: ref, path = chosen[report] raw = path.read_text(encoding="utf-8", errors="replace") - pages = [p for i, seg in enumerate(marker_re.split(raw)) - if (p := Page.from_segment(ref, i, seg)) is not None] + pages = [ + p + for i, seg in enumerate(marker_re.split(raw)) + if (p := Page.from_segment(ref, i, seg)) is not None + ] total += len(pages) logging.info("[index] %s: %d pages", report, len(pages)) yield from pages @@ -339,8 +367,11 @@ def write_docstore(pages: list[Page], path: Path, snippet_chars: NonNeg) -> None def read_docstore(path: Path) -> dict[DocId, DocRecord]: if not path.is_file(): raise FileNotFoundError(f"docstore not found: {path} — run `index` first.") - out = {(r := DocRecord.from_json(line)).docid: r - for line in path.read_bytes().splitlines() if line.strip()} + out = { + (r := DocRecord.from_json(line)).docid: r + for line in path.read_bytes().splitlines() + if line.strip() + } if not out: raise ValueError(f"docstore is empty: {path}") return out @@ -361,8 +392,9 @@ def read_ids(path: Path) -> list[DocId]: @beartype -def write_trec(queries: list[Query], results: dict[str, list[ScoredHit]], - path: Path, tag: NonBlank) -> None: +def write_trec( + queries: list[Query], results: dict[str, list[ScoredHit]], path: Path, tag: NonBlank +) -> None: """TREC run: ``qid Q0 docid rank score tag`` (one line per hit).""" path.parent.mkdir(parents=True, exist_ok=True) with path.open("w", encoding="utf-8") as f: @@ -372,8 +404,12 @@ def write_trec(queries: list[Query], results: dict[str, list[ScoredHit]], @beartype -def write_results_jsonl(queries: list[Query], results: dict[str, list[ScoredHit]], - path: Path, report: str | None) -> None: +def write_results_jsonl( + queries: list[Query], + results: dict[str, list[ScoredHit]], + path: Path, + report: str | None, +) -> None: """Human-readable companion to run.trec, one ``QueryResult`` per line.""" path.parent.mkdir(parents=True, exist_ok=True) with path.open("wb") as f: @@ -424,8 +460,10 @@ def search(self, index_dir: Path, texts: list[str], k: Positive) -> Ranked: retriever = bm25s.BM25.load(str(index_dir)) pos, scores = retriever.retrieve(bm25s.tokenize(texts, stopwords="en"), k=k) - return [[(int(p), float(s)) for p, s in zip(pos[q], scores[q])] - for q in range(len(texts))] + return [ + [(int(p), float(s)) for p, s in zip(pos[q], scores[q])] + for q in range(len(texts)) + ] @beartype @@ -454,8 +492,10 @@ def search(self, index_dir: Path, texts: list[str], k: Positive) -> Ranked: from splade_index import SPLADE res = SPLADE.load(str(index_dir), model=self._encoder()).retrieve(texts, k=k) - return [[(int(p), float(s)) for p, s in zip(res.doc_ids[q], res.scores[q])] - for q in range(len(texts))] + return [ + [(int(p), float(s)) for p, s in zip(res.doc_ids[q], res.scores[q])] + for q in range(len(texts)) + ] @beartype @@ -498,30 +538,46 @@ def _encoder(self): def _index(self, index_dir: Path, override: bool): from pylate import indexes - return indexes.PLAID(index_folder=str(index_dir), index_name=self.index_name, - override=override, nbits=self.nbits, - kmeans_niters=self.kmeans_niters) + return indexes.PLAID( + index_folder=str(index_dir), + index_name=self.index_name, + override=override, + nbits=self.nbits, + kmeans_niters=self.kmeans_niters, + ) def index(self, texts: list[str], index_dir: Path) -> None: index_dir.mkdir(parents=True, exist_ok=True) embeddings = self._encoder().encode( - texts, batch_size=self.batch_size, is_query=False, - show_progress_bar=self.show_progress) + texts, + batch_size=self.batch_size, + is_query=False, + show_progress_bar=self.show_progress, + max_length=self.doc_length, + ) # Corpus position is the PLAID docid; the caller maps it back via ids.json. self._index(index_dir, override=True).add_documents( documents_ids=[str(i) for i in range(len(texts))], - documents_embeddings=embeddings) + documents_embeddings=embeddings, + ) def search(self, index_dir: Path, texts: list[str], k: Positive) -> Ranked: from pylate import retrieve embeddings = self._encoder().encode( - texts, batch_size=self.batch_size, is_query=True, - show_progress_bar=self.show_progress) + texts, + batch_size=self.batch_size, + is_query=True, + show_progress_bar=self.show_progress, + ) index = self._index(index_dir, override=False) - ranked = retrieve.ColBERT(index=index).retrieve(queries_embeddings=embeddings, k=k) - return [[(int(h["id"]), float(h["score"])) for h in ranked[q]] - for q in range(len(texts))] + ranked = retrieve.ColBERT(index=index).retrieve( + queries_embeddings=embeddings, k=k + ) + return [ + [(int(h["id"]), float(h["score"])) for h in ranked[q]] + for q in range(len(texts)) + ] Engine = Union[Bm25Engine, SpladeEngine, ColbertEngine] @@ -544,16 +600,31 @@ class Searcher: @classmethod def load(cls, layout: Layout, engine: Engine) -> Searcher: if not layout.index_dir.is_dir(): - sys.exit(f"[query] no index at {layout.index_dir} — run " - f"`index --method {engine.name}` first.") - return cls(engine, read_ids(layout.ids), read_docstore(layout.docstore), - layout.index_dir) + sys.exit( + f"[query] no index at {layout.index_dir} — run " + f"`index --method {engine.name}` first." + ) + return cls( + engine, + read_ids(layout.ids), + read_docstore(layout.docstore), + layout.index_dir, + ) - def retrieve(self, queries: list[Query], *, top_k: Positive, pool: Positive, - report: str | None) -> dict[str, list[ScoredHit]]: + def retrieve( + self, + queries: list[Query], + *, + top_k: Positive, + pool: Positive, + report: str | None, + ) -> dict[str, list[ScoredHit]]: if report is not None and REPORT_RE.match(report) is None: - logging.warning("[query] --report %r isn't EXCHANGE_TICKER_YEAR; " - "filtering on the docid prefix anyway.", report) + logging.warning( + "[query] --report %r isn't EXCHANGE_TICKER_YEAR; " + "filtering on the docid prefix anyway.", + report, + ) # With --report we over-retrieve a deep pool, then keep that report's pages. depth = min(max(pool, top_k) if report else top_k, len(self.ids)) ranked = self.engine.search(self.index_dir, [q.text for q in queries], depth) @@ -561,12 +632,20 @@ def retrieve(self, queries: list[Query], *, top_k: Positive, pool: Positive, for q, hits in zip(queries, ranked): docid_hits = [(self.ids[p], s) for p, s in hits] if report: - docid_hits = [(d, s) for d, s in docid_hits if d.startswith(f"{report}#p")] + docid_hits = [ + (d, s) for d, s in docid_hits if d.startswith(f"{report}#p") + ] if not docid_hits: - logging.warning("[query] qid=%s: no %s pages in top %d — raise --pool", - q.qid, report, depth) - out[q.qid] = [ScoredHit.at(r, d, s, self.docstore) - for r, (d, s) in enumerate(docid_hits[:top_k], 1)] + logging.warning( + "[query] qid=%s: no %s pages in top %d — raise --pool", + q.qid, + report, + depth, + ) + out[q.qid] = [ + ScoredHit.at(r, d, s, self.docstore) + for r, (d, s) in enumerate(docid_hits[:top_k], 1) + ] return out @@ -590,7 +669,9 @@ def run(self) -> None: iter_pages(self.root, re.compile(self.page_split_marker, re.I), self.limit) ) if not pages: - sys.exit(f"[index] no pages under {self.root} — check --root and .mmd naming") + sys.exit( + f"[index] no pages under {self.root} — check --root and .mmd naming" + ) write_docstore(pages, lay.docstore, self.snippet_chars) self.method.index([p.text for p in pages], lay.index_dir) write_ids([p.docid for p in pages], lay.ids) @@ -624,13 +705,19 @@ def run(self) -> None: lay = Layout.under(self.output_dir, self.method.name) queries = self._load_queries() searcher = Searcher.load(lay, self.method) - results = searcher.retrieve(queries, top_k=self.top_k, pool=self.pool, - report=self.report) + results = searcher.retrieve( + queries, top_k=self.top_k, pool=self.pool, report=self.report + ) write_trec(queries, results, lay.run, self.run_tag or self.method.name) write_results_jsonl(queries, results, lay.results, self.report) - logging.info("[query] %d queries, report=%s, top_k=%d -> %s , %s", - len(queries), self.report or "WHOLE DATASET", self.top_k, - lay.run, lay.results) + logging.info( + "[query] %d queries, report=%s, top_k=%d -> %s , %s", + len(queries), + self.report or "WHOLE DATASET", + self.top_k, + lay.run, + lay.results, + ) # --- CLI: simple_parsing subcommands, wired into abseil's app.run ----------- # @@ -639,7 +726,8 @@ class Program: """Page-level retrieval over DeepSeek-OCR .mmd reports (BM25 + SPLADE + ColBERT).""" command: Union[IndexConfig, QueryConfig] = subparsers( - {"index": IndexConfig, "query": QueryConfig}) + {"index": IndexConfig, "query": QueryConfig} + ) @beartype